Skip to content

giansalex/branching-workflow

Repository files navigation

Branch Workflow - Github Bot

Build Status codecov Codacy Badge Maintainability
Auto Merge and Branch WorkFlow Probot APP.

A GitHub App built with probot.

Configuration file

Create .github/branch.yml and configure your branches.

autoMerge:
  - target: EPD
    source: EPD
  - target: QAS
    source: QAS

restrict:
  - target: master
    source:
      - ppr
      - pprfix
    close: true
  - target: ppr
    source: qas
    fork: true

Pull Request with title [WIP] aren't merged.

Github App Permissions & Events

Permissions

  • Repository contents - Read & write
  • Repository metadata - Read-only
  • Pull requests - Read & write
  • Single File - Read-only
    • Path: .github/branch.yml
  • Commit statuses - Read & write

Events

  • Check the box for Pull request events

Setup

# Install dependencies
npm install

# Run the bot
npm start

Docker

Using node alpine image.

You need to have private.pem file.

docker build -t branch-bot .
docker run -d -p 80:3000 -e APP_ID=<you-app-id> -e WEBHOOK_SECRET=<your-secret> -e PRIVATE_KEY=$(cat private.pem) --name gitbot branch-bot