-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: github action to check if PR has requested labels before being merged #19984
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
0eab8d1
@PeterYinusa @danjm as discussed last Friday, I removed the QA label check from this PR, in this commit. |
// Retrieve pull request labels | ||
const prLabels = await retrievePullRequestLabels(octokit, prRepoOwner, prRepoName, prNumber); | ||
|
||
const preventMergeLabels = ["needs-qa", "QA'd but questions", "issues-found"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can also add labels such as need-ux-ds-review
(which i see a lot of this one), blocked
(provided but maybe not used as many , stale
, DO-NOT-MERGE
, for now, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already a CI workflow to prevent merging DO-NOT-MERGE
labelled PRs. Though we may want to consolidate it here, that's a good point.
Though... we could move in the other direction as well. The DO-NOT-MERGE workflow is a lot simpler. We can access the necessary information (PR labels) purely using GitHub Actions context, no queries needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making blocked
block merging might make sense, if only to force someone to remove it when it's no longer applicable. In theory if a PR is blocked, it must not be mergable, so if it's remaining it's inaccurate. Perhaps we could automatically remove it instead though, not sure.
Not sure about stale
. If a PR was marked as stale, but then is ready to merge, then... that sounds good? Maybe I don't understand the workflow though, e.g. maybe we want people to explicitly remove that label? Here it seems reasonable to consider automatic removal as well though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your feedbacks @DDDDDanica and @Gudahtt . We've discussed this with @danjm @sethkfman @cortisiko @PeterYinusa @vpintorico last Friday and agreed on:
- adding checks for these labels in this new Github action:
need-ux-ds-review
,blocked
,stale
,DO-NOT-MERGE
- removing the old DO-NOT-MERGE Github action as duplicate of this new Github action
Here's the corresponding commit.
dc36dc8
to
aa6c269
Compare
Builds ready [aa6c269]
Page Load Metrics (1601 ± 26 ms)
Bundle size diffs
|
Explanation
The purpose of this new Github action is to check if PRs have the requested labels before they get merged:
team-
string (orexternal-contributor
label)A QA label, i.e. eitherQA Passed
orNo QA Needed/E2E Only
orSpot Check on the Release Build
Furthermore, it forbids merging PRs with the following labels:
needs-qa
,QA'd but questions
,issues-found
,need-ux-ds-review
,blocked
,stale
,DO-NOT-MERGE
. A consequence is that we can get rid of this github action.Progresses #12345
Screenshots/Screencaps
Recording for missing team label: https://recordit.co/U38NvBpIIj
Recording for missing QA label: https://recordit.co/jowmkvMkCh
Manual Testing Steps
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Board
label.In this case, a QA Engineer approval will be be required.
Other