-
-
Notifications
You must be signed in to change notification settings - Fork 14
Auto merge
A mixture of 2b and 2c was eventually implemented in https://github.com/dlang-bots/dlang-bot/pull/17
However instead of running a cron job permanently it listen to all success
CI events and loops over all auto-merge
-labelled PRs in the according repo (note that this needs to be done because CI "success" event doesn't contain a reference to the PR). To avoid overusing the API, this is throttled to happen at most every 5.minutes
per repository.
- Auth via oAuth
- Problematic as we would need to store all OAuth token for all members of @dlang
- Heroku isn't a safe place for such critical write-access tokens
- Running our own server for dlang-bot is an overkill (atm)
- Only users with write permissions can add labels (this depends on GH not changing their permissions model in the near future)
- Provide two labels:
auto-merge
andauto-merge-squash
(the latter will perform a squashed merge) - dlang-bot has write-access and will do the merge
Options:
-> update database on new events
Problem 1: we might miss an event
Problem 1: we might overuse the API and run in rate limitations
Problem 1: we might need to send multiple requests as we need to loop over all open PRs and the API only returns 100 results per query
One problem applies to all solutions, we need to ignore potentially failing CIs like CodeCov. Would be ugly to replicate the GH settings what CI is required, but still fairly easily maintainable.