You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for --commit-id on gh pr review #12201
Describe the feature or problem you’d like to solve
The github API supports a commit_id parameter on the PR review create operation, but this is not supported by gh pr review
Proposed solution
Add a --commit-id parameter to gh pr review.
This will allow automation to submit a review for a specific version of the code, avoiding race conditions that might cause an automation (or human user) to accidentally approve a PR after unexpected changes have been pushed to the branch.
Additional context
I have an automation in a github action that falls victim to this race condition, which is intended to smooth the process of merging PRs when using the stack-pr tool. Specifically, it:
reads the current commit hash
checks if the PR is currently awaiting approval
checks if there is a previously-dismissed review (by a human, not itself) with the same commit hash
if the checks in step 2 and step 3 are true, it approves the PR using gh pr review
If there is a push to the branch between steps 1 and 4, the script winds up approving based on an old version of the branch. Unfortunately running stack-pr submit on an existing set of PRs engineers this situation by updating the target branch (triggering the workflow) and then immediately pushing to the branch.
Thank you for your issue! We have categorized it as a feature request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the
help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.
Activity
github-actions commentedon Nov 25, 2025
Thank you for your issue! We have categorized it as a feature request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.