A GitHub App that manages the PR queue when merging into production.
-
When the
READY FOR MERGE
label is added to the PR, aQUEUED FOR MERGE #X
label will be added to the PR. TheX
will be the next open spot in the queue. -
The
READY FOR MERGE
label can only be added if theCORE APPROVED
label is added first to the PR. The PR must be approved by a core approver first before adding theCORE APPROVED
label. -
If any
QUEUED FOR MERGE
labels are added before adding theCORE APPROVED
orREADY FOR MERGE
label, a helpful message will appear on the PR telling the user to remove theQUEUED FOR MERGE
label. The PR will only be added to the queue when the user adds theCORE APPROVED
andREADY FOR MERGE
labels. -
If all the
QUEUED FOR MERGE #X
labels are assigned (no more spots in the queue), theQUEUE IS CURRENTLY FULL
label will appear on the PR. The assignee needs to remove theREADY FOR MERGE
label andQUEUE IS CURRENTLY FULL
labels, and wait a few minutes before re-applying back to the queue. To re-apply into the queue, just add theREADY FOR MERGE
label to the PR again. -
The queue is updated when any of the
QUEUED FOR MERGE #X
labels is removed in any of the PRs. Each of the PRs containing these labels will have updated queue labels. -
The PR can only be merged when it contains the
QUEUED FOR MERGE #1
,READY FOR MERGE
, andCORE APPROVED
labels. -
Once the PR is merged, the
QUEUED FOR MERGE #1
label will be removed from the PR and update all the other PRs in the queue.
- Go here: https://github.com/apps/queue-manager.
- Click the
Configure
button on the top right. - Click the org the repo is in.
- Click
Select repositories
and add the repository you want this GitHub app to be used in. - Click the
Update Access
button. - Go to your repo’s Settings -> Integrations and services. The Github App should now be added into your repo’s Integrations and services.
- Set up the labels, the labels must match the below cases exactly:
- Need a
READY FOR MERGE
label - Need a
QUEUED FOR MERGE #1
,QUEUED FOR MERGE #2
, …however many you want to be put in the queue, there is no limit as long as the label starts withQUEUED FOR MERGE #
- Need a
CORE APPROVED
label
- Need a
- To add a PR to the queue, make sure to first add the
CORE_APPROVED
label, then theREADY FOR MERGE
label. - To remove a PR from the queue, make sure to remove the
QUEUED FOR MERGE #X
label andREADY FOR MERGE
label from the PR - Test try with a few trial PRs (make at least 3 PRs)
- Test if the labels properly update when a PR is added to the queue
- Test if the labels properly update when a PR is removed from the queue
- Test if the PR with the
QUEUED FOR MERGE #1
label can be merged, while other PRs in the queue cannot be merged.
If you have suggestions for how queue-manager could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
For more, check out the Contributing Guide.
ISC © 2019 jmunoz1992