Update token supplied to 8BitJonny/gh-get-current-pr to support forked-PR execution#32
Closed
JackPGreen wants to merge 2 commits intohazelcast:masterfrom
Closed
Update token supplied to 8BitJonny/gh-get-current-pr to support forked-PR execution#32JackPGreen wants to merge 2 commits intohazelcast:masterfrom
8BitJonny/gh-get-current-pr to support forked-PR execution#32JackPGreen wants to merge 2 commits intohazelcast:masterfrom
Conversation
Clarify comment regarding GitHub token usage in workflow.
|
I see token is passed here https://github.com/hazelcast/hazelcast-mono/blob/master/.github/workflows/backport.yml
|
JackPGreen
added a commit
that referenced
this pull request
Dec 11, 2025
Despite _extensive_ testing for #31, [the action fails with a cryptic `Not Found` when executed for real](https://github.com/hazelcast/hazelcast-mono/actions/runs/20035261330). After further investigation, this could be reproduced [within a PR from a fork _only_](https://github.com/JackPGreen/backport-test/actions/runs/20035612426/job/57456162344), which was not previously tested. The root cause is that the "implicit" token supplied to the workflow does not have permissions to query metadata [_outside of the repo it's being run from_](https://github.com/orgs/community/discussions/46566). Instead, we should use the supplied token that we already use for the "main" backporting operation. After discussion as part of #32, it was also suggested to avoid using the token with a third-party action when a first-party solution was available (with some mangling). Changes: - add token to `get-current-pr` step - replace `8BitJonny/gh-get-current-pr` with our own implementation - fix a syntax error when creating backport branches [Successful execution from a forked PR](https://github.com/JackPGreen/backport-test/actions/runs/20098427088), and [resultant backport](JackPGreen/backport-test#242). Closes: #32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Despite extensive testing for #31, the action fails with a cryptic
Not Foundwhen executed for real.After further investigation, this could be reproduced within a PR from a fork only, which was not previously tested.
The root cause is that the "implicit" token supplied to the workflow does not have permissions to query metadata outside of the repo it's being run from. Instead, we should use the supplied token that we already use for the "main" backporting operation.
Successful execution from a forked PR, and resultant backport.