Repository navigation
fix(ci): accept bot PR approval when reviewDecision is empty - #439
Merged
Merged
Conversation
Fallback to REST reviews API when aggregated reviewDecision is not APPROVED so smoke-test orchestration approvals count. Refs: #438
There was a problem hiding this comment.
Pull request overview
This PR fixes release validation in GitHub Actions when a release PR is approved by github-actions[bot] but gh pr list --json reviewDecision returns an empty/non-APPROVED value, by falling back to querying individual PR reviews via the REST API.
Changes:
- Add a fallback approval check using
gh api .../pulls/{n}/reviewswhenreviewDecisionis notAPPROVED(root workflow + workspace template workflow). - Document the fix in
CHANGELOG.mdand the workspace template changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
.github/workflows/release.yml |
Adds REST reviews fallback to the “Find and verify PR” approval gate in the release workflow. |
assets/workspace/.github/workflows/release-core.yml |
Mirrors the same fallback logic in the workspace template’s release workflow. |
CHANGELOG.md |
Adds a “Fixed” entry describing the bot-approval/reviewDecision issue. |
assets/workspace/.devcontainer/CHANGELOG.md |
Mirrors the same changelog entry for the workspace template. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add --paginate to gh api reviews call (both workflows) - Scope fallback to empty/null reviewDecision only; explicit rejections (CHANGES_REQUESTED, REVIEW_REQUIRED) still fail - Add pull-requests: read to validate job in release.yml Refs: #438
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Avoid gh api --paginate with --jq (per-page output). Use --slurp and a single jq pass. Refs: #438
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.
Description
Release validation used only
reviewDecisionfromgh pr list. When smoke-test orchestration approves the release PR withgit*ub-actions[bot], branch protection can leavereviewDecisionempty while individual reviews still showAPPROVED. This change falls back to the REST reviews API whenreviewDecisionis notAPPROVED, matching the RCA on #438.Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentation onlychore-- Maintenance task (deps, config, etc.)refactor-- Code restructuring (no behavior change)test-- Adding or updating testsci-- CI/CD pipeline changesbuild-- Build system or dependency changesrevert-- Reverts a previous commitstyle-- Code style (formatting, whitespace)Modifiers
!) -- This change breaks backward compatibilityChanges Made
.github/workflows/release.yml— extend Find and verify PR with retry-wrappedgh api …/pulls/{n}/reviewsfallback whenreviewDecision != APPROVED.assets/workspace/.github/workflows/release-core.yml— same logic for the workspace/downstream template.CHANGELOG.mdandassets/workspace/.devcontainer/CHANGELOG.md— document the fix under## [0.3.1] - TBD/ Fixed.Changelog Entry
Under
## [0.3.1] - TBD/### Fixed:reviewDecisionis empty (bot approvals not counted by branch protection)Testing
just test)Manual Testing Details
N/A — workflow-only change; pre-commit hooks passed on commit.
Checklist
docs/templates/, then runjust docs)CHANGELOG.mdunder## [0.3.1] - TBD(and pasted the entry above)Additional Notes
Targets
release/0.3.1per release-line fix. Downstreamdevcontainer-smoke-teststill needs template sync after merge.Refs: #438