-
-
Notifications
You must be signed in to change notification settings - Fork 672
A few fixes for the auto-cherry-pick script #19307
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
Conversation
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- run: npm install ./build-support/cherry_pick | ||
- name: Run Script | ||
# NB: See https://github.com/actions/github-script/pull/397 | ||
uses: thejcannon/github-script@7ed0cc648959192a3868f0de9862110d7922b7cc | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.WORKER_PANTS_CHERRY_PICK_PAT }} | ||
allow-empty-token: true |
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 this allow-empty-token
now unneeded (here and above)?
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 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.
Approved conditional on satisfying yourself that the root cause of the token-related error is fixed here, and we're not just papering over it in the case of a PR without cherry-picks. (I think the change to avoid always
makes sense though, even if there's additional changes required.)
Yeah sorry, I shouldn't make PRs before bed 😂 I'll switch the PR description to be accurate. The changing to upstream github-script is the actual bugfix. The |
if: awlays()
in GHA
Seems to have worked 😄 https://github.com/pantsbuild/pants/actions/runs/5269341468 |
OK poking around the GH API, there seem to be at least the four states mentioned above. 👍 |
👍
👍 |
A few fixes:
if: always()
. As I'm understanding it, this will force the job to run, even if prerequisites didn't run (I'm thinking this is for, like critical teardown jobs/steps). Instead useif: success() || failure()
, which is suggested in the docs. As I understand there are (at least?) 4 states:success
,failure
,skipped
, andcancelled
.github-script
since we no longer talk to the webact
has a bugSo, can't test that this fixes it, but the suggestion comes from GitHub directly: https://docs.github.com/en/actions/learn-github-actions/expressions#always