cdamian / plus-pull
用于合并Github pull requests的脚本,这些pull requests获得了足够的+1票
v0.8.1
2019-07-23 14:52 UTC
Requires
Requires (Dev)
- dev-master
- v0.8.1
- v0.8.0
- v0.7.0
- v0.6.4
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.13
- v0.5.12
- v0.5.11
- v0.5.10
- v0.5.9
- v0.5.8
- v0.5.7
- v0.5.6
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.0
- v0.3.0
- v0.2.0
- v0.1.0
- dev-fix-yaml-read
- dev-fix-wait
- dev-dockerfile
- dev-dependency-upgrades
- dev-add-grace-period
- dev-allow-different-merge-modes
- dev-disable-label-removal
- dev-check-review-comments
- dev-fix-multiple-statuses
- dev-allow-leading-whitespace
This package is auto-updated.
Last update: 2024-09-24 02:14:18 UTC
README
plus-pull
这是一个简单的脚本,用于检查Github仓库中的pull requests,如果满足某些条件,则会合并它们。
默认情况下,这些条件是
- :+1和:-1的总和至少为3
- 没有[B]类型的阻塞评论
- 请求可合并
- (可选)所有构建状态正常
安装
composer.phar create-project cdamian/plus-pull
命令行使用
检查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)
创建新的github授权token
token:create [--note="..."]
Options:
--note Note for the authorization token on github (default: "plus-push")
配置文件
通过配置文件,您可以设置github授权用户名和密码或github授权token。
其他部分设置仓库所有者和名称,您可以更改默认的所需投票数、是否检查状态和投票者白名单。
您还有自动为评论中找到的关键词添加标签的选项。在下面的示例中,如果我们看到评论中有[B],我们将添加带有指定颜色的标签'blocked'。如果标签不存在,将会创建它。
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]'
致谢
我们在工作中使用了一个类似的脚本,由@adriacidre发起。但这完全是一个重写,以使其更容易添加更多功能。
标签支持由@ifosch提供