-
Notifications
You must be signed in to change notification settings - Fork 250
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_: implement PR review workflow #5877
base: develop
Are you sure you want to change the base?
Conversation
Jenkins BuildsClick to see older builds (134)
|
bfe0b66
to
8a90758
Compare
Looks like you have BREAKING CHANGES in your PR. Check-list
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## develop #5877 +/- ##
===========================================
+ Coverage 45.42% 46.09% +0.67%
===========================================
Files 891 891
Lines 158084 158082 -2
===========================================
+ Hits 71808 72869 +1061
+ Misses 78201 76848 -1353
- Partials 8075 8365 +290
Flags with carried forward coverage won't be shown. Click here to find out more. |
da41420
to
54ff2e6
Compare
Hmmm
So it seems we will have to make the relevant teams inside status-go repository first. |
49a9364
to
0b606e4
Compare
0b606e4
to
6b552c1
Compare
@siddarthkay is it time to review this? Or are you still testing? |
1fb7f36
to
03dc775
Compare
03dc775
to
a3ef631
Compare
a3ef631
to
3af26d0
Compare
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.
Breaking changes have been approved by Mobile and Desktop QA. This PR can now be merged.
name: 'QA Approval Check', | ||
head_sha: context.payload.pull_request.head.sha, | ||
status: 'completed', | ||
conclusion: 'failure', |
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.
@igor-sirotin : added a failing check as discussed, the github-actions bot will no longer request changes, It will just add a comment with an appropriate message.
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.
Does this create a separate status check? Maybe we could just use this check itself?
Something like this should be enough I think 🤔
status-go/.github/workflows/commit-check.yml
Line 100 in a1c6d7f
core.setFailed("Some commit messages are ill-formed") |
The reason is not to bloat the checks list. It's already 12 😅
And the comment can be implemented as "sticky comment", I did it in the commit-check
. Can be a single comment in the PR that will be edited when reviews received/lost.
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.
Breaking changes have been approved by Mobile and Desktop QA. This PR can now be merged.
455c661
to
79e8afc
Compare
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.
Breaking changes have been approved by Mobile and Desktop QA. This PR can now be merged.
0d81b86
to
a677c76
Compare
added a check to prevent the bot from approving the PR multiple times. |
@@ -0,0 +1,145 @@ | |||
name: PR Review Workflow for Breaking Changes |
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.
Shorter name would be better I think
name: PR Review Workflow for Breaking Changes | |
name: PR Review Workflow |
- synchronize | ||
|
||
jobs: | ||
check_breaking_change: |
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.
id: set_reviewers | ||
run: | | ||
echo "mobile_qa=churik,yevh-berdnyk,VolodLytvynenko,pavloburykh,mariia-skrypnyk,Horupa-Olena" >> $GITHUB_OUTPUT | ||
echo "desktop_qa=anastasiyaig,virginiabalducci,glitchminer,antdanchenko" >> $GITHUB_OUTPUT |
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.
This works ofc, if it's simpler 👍 We can improve in future.
Though I'm worried about pinging all QAs, we end up with the list like this:
Imagine what will happen when we add devs reviews as well 🥲
So I think the "randomise" logic is required before merging this. Otherwise we'll die in tons of notifications.
const desktopQA = '${{ steps.set_reviewers.outputs.desktop_qa }}'.split(','); | ||
const reviewers = [...mobileQA, ...desktopQA]; | ||
|
||
await github.rest.pulls.requestReviewers({ |
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.
Might this re-request reviews, if already approved? I think we don't want such behaviour?
} | ||
}); | ||
|
||
- name: Allow PR merge if conditions are met |
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.
Do we need the bot approval at all, if we have the status check already? It's kinda duplication 🤔
name: 'QA Approval Check', | ||
head_sha: context.payload.pull_request.head.sha, | ||
status: 'completed', | ||
conclusion: 'failure', |
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.
Does this create a separate status check? Maybe we could just use this check itself?
Something like this should be enough I think 🤔
status-go/.github/workflows/commit-check.yml
Line 100 in a1c6d7f
core.setFailed("Some commit messages are ill-formed") |
The reason is not to bloat the checks list. It's already 12 😅
And the comment can be implemented as "sticky comment", I did it in the commit-check
. Can be a single comment in the PR that will be edited when reviews received/lost.
if (!mobileQAApproved && !desktopQAApproved) { | ||
message += 'Both mobile-qa and desktop-qa teams have not approved this PR yet.'; | ||
} else if (!mobileQAApproved) { | ||
message += 'The mobile-qa team has not approved this PR yet.'; | ||
} else if (!desktopQAApproved) { | ||
message += 'The desktop-qa team has not approved this PR yet.'; | ||
} |
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.
if (!mobileQAApproved && !desktopQAApproved) { | |
message += 'Both mobile-qa and desktop-qa teams have not approved this PR yet.'; | |
} else if (!mobileQAApproved) { | |
message += 'The mobile-qa team has not approved this PR yet.'; | |
} else if (!desktopQAApproved) { | |
message += 'The desktop-qa team has not approved this PR yet.'; | |
} | |
message += `- ${mobileQAApproved ? '[ ]' : '[x]'} Mobile QA team review` | |
message += `- ${desktopQAApproved ? '[ ]' : '[x]'} Desktop QA team review` |
This commit Implements a PR review workflow like this : - This action will check if `breaking change` label exists on PR. - if it does then `@status-im/desktop-qa` and `@status-im/mobile-qa` are asked for review on this PR. - Unless 1 person from `@status-im/desktop-qa` and `@status-im/mobile-qa` approve that PR the Github action will block the PR. - Only after these conditions match the Github action will allow merging of this PR.
a677c76
to
b56e69d
Compare
23a73a7
to
f2438bb
Compare
f2438bb
to
fc73ab2
Compare
Summary
This PR Implements a PR review workflow like this :
breaking change
label exists on PR.@status-im/desktop-qa
and@status-im/mobile-qa
are asked for review on this PR.@status-im/desktop-qa
and@status-im/mobile-qa
approve that PR the Github action will block the PR.