Script that checks pull requests and merges them if they satisfy certain requirements.
This repository has been archived on 2026-07-24. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • PHP 99.3%
  • Dockerfile 0.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-13 20:33:59 +02:00
bin no need for use statement 2013-05-07 16:37:01 +02:00
src/PlusPull Fix YAML read 2019-07-23 16:50:45 +02:00
tests/PlusPull Fix for "wait" option 2019-07-23 16:17:24 +02:00
.dockerignore added .dockerignorefile 2018-03-01 12:13:39 +01:00
.gitignore pull and limit option implemented 2013-05-07 18:56:29 +02:00
.travis.yml Fix for "wait" option 2019-07-23 16:17:24 +02:00
build.xml simple ant file 2013-05-15 21:13:14 +02:00
CHANGES.md Fix YAML read 2019-07-23 16:50:45 +02:00
composer.json Bump phpunit/phpunit from 5.7.27 to 8.5.52 2026-01-27 23:02:46 +00:00
composer.lock Bump phpunit/phpunit from 5.7.27 to 8.5.52 2026-01-27 23:02:46 +00:00
config.yml.dist add optional wait period 2017-06-30 17:18:40 +02:00
Dockerfile Fix for "wait" option 2019-07-23 16:17:24 +02:00
LICENSE.txt license 2013-05-07 19:33:42 +02:00
phpcs.xml simple ant file 2013-05-15 21:13:14 +02:00
phpunit.xml.dist some cleaning of tests and code 2013-05-07 15:14:41 +02:00
README.md 0.7.0 2017-07-14 17:01:32 +02:00
renovate.json Add renovate.json 2026-06-13 18:32:19 +00:00

Build Status

plus-pull

Simple script that checks pull requests on a repository on Github and pulls them if they satisfy certain requirements.

By default these requirements are:

  1. the sum of +1 and -1 is at least 3
  2. there are no [B] blocker comments
  3. the request is mergeable
  4. (optionally) all build statuses are OK

Install

composer.phar create-project cdamian/plus-pull

Command Line Usage

Check pull requests:

check [-p|--pull] [-l|--limit="..."] [config-file]

Arguments:
 config-file           Path of the yaml configuration file (default: "config.yml")

Options:
 --pull (-p)           Pull the request if all conditions are met
 --limit (-l)          Maximum numbers of pull (default: 1)

Create a new github authorization token:

token:create [--note="..."]

Options:
 --note                Note for the authorization token on github (default: "plus-push")

Configuration File

With the config file you can set the github authorization username and password or an github authorizisation token.

The other section sets the repository owner and name and you can change the defaults for needed votes, if status will be checked and voter whitelist.

You have also the option to automatically add labels for keywords found in the comments. In the example below we will add the label 'blocked' with the given color if we see '[B]' in one of the comments. The label will be created if it doesn't exist.

authorization:
    username: christofdamian
    password: secret
    token: githubtoken

repositories:
    -
        username: christofdamian
        name: test
        status: true
        required: 3
        whitelist: [ christofdamian ]
        wait: 300
        mergemode: merge
        labels:
            -
                name: blocked
                color: eb6420
                hook: '[B]'

Credits

We are using a similar script at work, which was started by @adriacidre . This is a complete rewrite though to make it easier to add further features.

Label support by @ifosch