-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[No QA] Migrate off actions-ecosystem PR helpers; bump actions/checkout to v6 #86687
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
Open
roryabraham
wants to merge
2
commits into
main
Choose a base branch
from
Rory-FixGHANodeWarnings
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: Get merged pull request | ||
| description: Given the current push event's commit SHA, finds the pull request that was merged to produce it. | ||
|
|
||
| inputs: | ||
| github_token: | ||
| description: GitHub token used to call the API | ||
| required: true | ||
|
|
||
| outputs: | ||
| number: | ||
| description: The PR number | ||
| value: ${{ steps.getMergedPR.outputs.number }} | ||
| title: | ||
| description: The PR title | ||
| value: ${{ steps.getMergedPR.outputs.title }} | ||
| body: | ||
| description: The PR body | ||
| value: ${{ steps.getMergedPR.outputs.body }} | ||
| labels: | ||
| description: Newline-separated label names | ||
| value: ${{ steps.getMergedPR.outputs.labels }} | ||
| assignees: | ||
| description: Newline-separated assignee logins | ||
| value: ${{ steps.getMergedPR.outputs.assignees }} | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Find merged pull request for this commit | ||
| id: getMergedPR | ||
| shell: bash | ||
| run: | | ||
| RESP=$(gh api -H "Accept: application/vnd.github+json" "/repos/${GITHUB_REPOSITORY}/commits/${GITHUB_SHA}/pulls") | ||
|
|
||
| # Prefer the PR whose merge_commit_sha matches exactly (parity with the old action) | ||
| PR=$(echo "$RESP" | jq -c "first(.[] | select(.merge_commit_sha == \"${GITHUB_SHA}\"))" 2>/dev/null) | ||
|
|
||
| # Fall back to the first merged PR associated with this commit | ||
| if [[ -z "$PR" || "$PR" == "null" ]]; then | ||
| PR=$(echo "$RESP" | jq -c 'first(.[] | select(.merged_at != null))' 2>/dev/null) | ||
| fi | ||
|
|
||
| if [[ -z "$PR" || "$PR" == "null" ]]; then | ||
| echo "::warning::No merged pull request found for commit ${GITHUB_SHA}" | ||
| exit 0 | ||
| fi | ||
|
|
||
| { | ||
| echo "number=$(echo "$PR" | jq -r '.number')" | ||
| echo "title=$(echo "$PR" | jq -r '.title')" | ||
|
|
||
| echo "body<<GETMPR_EOF" | ||
| echo "$PR" | jq -r '.body // ""' | ||
| echo "GETMPR_EOF" | ||
|
|
||
| echo "labels<<GETMPR_LABELS_EOF" | ||
| echo "$PR" | jq -r '[.labels[].name] | join("\n")' | ||
| echo "GETMPR_LABELS_EOF" | ||
|
|
||
| echo "assignees<<GETMPR_ASSIGNEES_EOF" | ||
| echo "$PR" | jq -r '[.assignees[].login] | join("\n")' | ||
| echo "GETMPR_ASSIGNEES_EOF" | ||
|
|
||
| } >> "$GITHUB_OUTPUT" | ||
| env: | ||
| GITHUB_TOKEN: ${{ inputs.github_token }} |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
skipDeploynow runsgh pr commentwith only a PR number, but this job no longer checks out the repository. Ingh pr commentdocs, repository selection is inherited from parent flags (-R/--repo) when local repo context is absent; without checkout and without-R, this path can fail to resolve the repo and the job will error when deploy is skipped (the common non-deployer/checklist-locked path). Please add--repo ${{ github.repository }}(or setGH_REPO) so commenting works reliably in this checkout-free job.Useful? React with 👍 / 👎.
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.
@MelvinBot update
gh pr commentto pass the repo flag as described in this codex commentThere 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.
The codex comment is correct — the
skipDeployjob has noactions/checkoutstep, sogh pr commentwon't have local repo context to resolve the target repository. The fix is to add--repo ${{ github.repository }}to thegh pr commentcall.The current line:
gh pr comment ${{ needs.chooseDeployActions.outputs.MERGED_PR }} --body "$(cat <<'EOF'Should be:
gh pr comment ${{ needs.chooseDeployActions.outputs.MERGED_PR }} --repo ${{ github.repository }} --body "$(cat <<'EOF'