-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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] Add deployer GH handle to deploy messages #4274
Conversation
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.
Code LGTM! Couldn't test locally, so I'm interested to see how that goes.
@@ -128,7 +128,7 @@ jobs: | |||
# Version: 2.4.3 | |||
uses: repo-sync/pull-request@65194d8015be7624d231796ddee1cd52a5023cb3 | |||
with: | |||
source_branch: cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }} | |||
source_branch: ${{ github.actor }}-cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }} |
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.
Is there no way to get this or pass this along a different way?
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.
Maybe via the API to check for a workflow https://docs.github.com/en/rest/reference/actions#list-workflow-runs ?
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 this feels hacky, but the difficult part with using this API is identifying the workflow run that's associated with a given PR or version. Let me dig into it a bit.
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.
Basically, the information we have when we're running markPullRequestsAsDeployed
is:
- The version
- The PR number
Then given those, we would need to find the cherryPick.yml
workflow run that:
- Generated that version, OR
- Was executed with that PR number as input.
But unfortunately the inputs to a workflow run are not saved by their API, so I wasn't able to see how we could identify the correct workflow run.
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.
Open to suggestions if you see something I'm missing
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 don't see anything on the API docs on first read, but let me keep looking a bit further.
Looks great- Feel free to merge when you are ready to test @roryabraham |
Looks like we missed the chance to test this while the current checklist was still unlocked 😞 Gotta test it during the next deploy cycle. @isagoico can you ping or DM me before adding the lock label to the next checklist? Thanks! |
Testing this out now |
Unfortunately it looks like this didn't work as expected https://github.com/Expensify/App/runs/3303693182?check_suite_focus=true |
We've got one successful test for a PR merged w/ the CP Staging label: #4568 (comment) |
🚀 Deployed to staging by @roryabraham in version: 1.0.83-5 🚀
|
Okay, just verified over here that this is fully functional now |
@AndrewGable Will you please review this?
Details
This adds the deployer's GH handle to deploy messages, where the deployer is defined as:
CP Staging
label), the person who merged the PR.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/168264
Tests
CP Staging
label. Verify that it gets a "Cherry-picked to staging by <whoever merged it>" comment.QA Steps
None.
Tested On
n/a, GH only. But I did do a lot of incremental testing using a local octokit instance while developing.