Repository navigation
ci: revert workflow_dispatch from Claude code review #105
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
Merged
Merged
Changes from all commits
Commits
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
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.
🧩 Analysis chain
🌐 Web query:
Foractions/checkoutin apull_requestworkflow, what is the recommended configuration to check out the exact PR head commit for both same-repo and fork PRs? Please verify whetherrepository: ${{ github.event.pull_request.head.repo.full_name }}withref: ${{ github.event.pull_request.head.sha }}is preferred over using onlygithub.event.pull_request.head.ref.💡 Result:
Recommended configuration (pull_request workflow) to check out the exact PR head commit for both same-repo and fork PRs: - uses: actions/checkout@v6 with: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.sha }} This uses the PR head repo’s full_name (so forks work) together with the PR head SHA (so you check out the exact commit, not the default merge ref). Why not rely on github.event.pull_request.head.ref? - The checkout action docs explicitly show checking out the PR head by specifying ref: ${{ github.event.pull_request.head.sha }} (described as “Checkout pull request HEAD commit instead of merge commit”). [1] - In a pull_request-triggered workflow, GitHub Actions checks out the PR merge commit by default (GITHUB_SHA points to the merge commit), so you must override it to get the head commit. [2] - Using only github.event.pull_request.head.ref would select a branch name rather than the exact commit; the docs guidance is to use the head SHA for the head-commit checkout. [1] Is repository: ${{ github.event.pull_request.head.repo.full_name }} with ref: ${{ github.event.pull_request.head.sha }} preferred over only head.ref? - Yes, because it directly checks out the exact head commit (head.sha) and correctly targets the head repository for forks (head.repo.full_name), while head.ref is only a ref name and isn’t the documentation’s recommended mechanism for ensuring the exact head commit checkout. [1][3] Note: actions/checkout also documents that ref input can be a branch, tag, or SHA, and provides an example specifically for pull_request head SHA checkout. [4][1]
Citations:
Check out the exact PR commit, not the mutable branch name.
Line 31 uses
github.event.pull_request.head.ref, which is just the source branch name. This fails for fork PRs because checkout still defaults to the base repository, and it reviews/pushes against a newer commit if the branch moves before a rerun. Use the PR head repository plushead.shato ensure the agent always works on the exact revision that triggered the workflow.Suggested change
- name: Checkout PR head uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: - ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 20📝 Committable suggestion
🤖 Prompt for AI Agents