Merge bot for GitHub¶
The script gives the right to a certain circle of people to merge branches in the repository by sending the certain comment in the pull request.
Prepare IFTTT’s hooks¶
Create AWS Lambda function¶
Create lambda function with following settings:
GITHUB_TOKEN– generate one in https://github.com/settings/tokens . Select scope
USERNAMES– use comma-separated list of Github’s usernames without @.
LOG_LEVEL– optional. Set to DEBUG to get detailed logs in AWS CloudWatch.
MSG_RQST_MERGE– message-request for merge. Default:
I approve to merge it now
IFTTT_HOOK_NOT_FINISHED_PR– use IFTTT’s hooks
API Gateway. Once you configure it and save, you will see
API endpointunder Api Gateway details section. Use option
Now register the URL as webhook at github: https://developer.github.com/webhooks/creating/. Use following webhook settings:
Payload URL – the URL
Content Type: application/json
Which events would you like to trigger this webhook? – Let me select individual events and then select
[x] Issue comments
Change time running function by 15 sec –
Timeout(default 3 sec)
Create IFTTT applets¶
If – Service Webhooks.
Prepare IFTTT's hooksof this instruction. For example:
Then – whatever you like. For actions with text ingredients use following for failed, success and not finished checks:
Value1– Author of the merge
Value2– Author of the pull-request
Value3– Link to pull-request