-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[No QA] Verify that commits are signed when PRs are created or synchronized #7981
Conversation
This is a work in progress correct? |
Yes, sorry I should've marked it as so @neil-marcellini |
685c6cd
to
dfbf3c6
Compare
Ready for review |
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 looks good to me, but I'm not too familiar with GH actions, so I'll let another person approve.
const allCommitsSigned = _.every(data, datum => datum.commit.verification.verified); | ||
|
||
if (!allCommitsSigned) { | ||
const unsignedCommits = _.filter(data, datum => !datum.commit.verification.verified); |
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.
NAB: Instead of having a separate check of allCommitsSigned
you could replace it with this
const unsignedCommits = _.filter(data, datum => !datum.commit.verification.verified);
And then in the check:
if (!_.isEmpty(unsignedCommits)) {
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.
I agree with @neil-marcellini and think it's NNAB (NOT not a blocker 😅)
const allCommitsSigned = _.every(data, datum => datum.commit.verification.verified); | ||
|
||
if (!allCommitsSigned) { | ||
const unsignedCommits = _.filter(data, datum => !datum.commit.verification.verified); |
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.
I agree with @neil-marcellini and think it's NNAB (NOT not a blocker 😅)
Updated and ready for another review |
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 the changes, it looks good to me.
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.
LGTM too 👍
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by @chiragsalian in version: 1.1.42-6 🚀
|
Details
This PR adds a new PR check to verify that commits are signed.
Fixed Issues
https://expensify.slack.com/archives/C01GTK53T8Q/p1646185784242179
Tests
All the commits on this PR were originally unsigned:
Then I got a workflow run where those commits were verified to be unsigned.
https://github.com/Expensify/App/runs/5395802072?check_suite_focus=true
Then I retroactively signed the commits on this PR:
Then the check passed 🎉
https://github.com/Expensify/App/runs/5395944872?check_suite_focus=true
After merging this, we also need to make sure that these tests pass when the PR is coming from a fork.
PR Review Checklist
Contributor (PR Author) Checklist
main
before submitting my PR for review### Fixed Issues
section abovesrc/languages/*
files (if applicable)Styling.md
) for all style edits I madePR Reviewer Checklist
main
before submitting the PR### Fixed Issues
section abovesrc/languages/*
files (if applicable)Tested On
GitHub only