Skip to content

fix(ci): accept bot PR approval when reviewDecision is empty - #439

Merged
c-vigo merged 3 commits into
release/0.3.1from
bugfix/438-smoke-test-dispatch-rc20
Mar 25, 2026
Merged

c-vigo merged 3 commits into
release/0.3.1from
bugfix/438-smoke-test-dispatch-rc20

Conversation

@c-vigo

@c-vigo c-vigo commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

Release validation used only reviewDecision from gh pr list. When smoke-test orchestration approves the release PR with git*ub-actions[bot], branch protection can leave reviewDecision empty while individual reviews still show APPROVED. This change falls back to the REST reviews API when reviewDecision is not APPROVED, matching the RCA on #438.

Type of Change

  • feat -- New feature
  • fix -- Bug fix
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • .github/workflows/release.yml — extend Find and verify PR with retry-wrapped gh api …/pulls/{n}/reviews fallback when reviewDecision != APPROVED.
  • assets/workspace/.github/workflows/release-core.yml — same logic for the workspace/downstream template.
  • CHANGELOG.md and assets/workspace/.devcontainer/CHANGELOG.md — document the fix under ## [0.3.1] - TBD / Fixed.

Changelog Entry

Under ## [0.3.1] - TBD / ### Fixed:

  • Release validation fails when bot approves PR (#438)
    • Add fallback to individual PR review check when reviewDecision is empty (bot approvals not counted by branch protection)

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

N/A — workflow-only change; pre-commit hooks passed on commit.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md under ## [0.3.1] - TBD (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Targets release/0.3.1 per release-line fix. Downstream devcontainer-smoke-test still needs template sync after merge.

Refs: #438

Fallback to REST reviews API when aggregated reviewDecision is not APPROVED so smoke-test orchestration approvals count.

Refs: #438
@c-vigo c-vigo self-assigned this Mar 25, 2026
@c-vigo
c-vigo requested a review from Copilot March 25, 2026 11:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}/reviews when reviewDecision is not APPROVED (root workflow + workspace template workflow).
  • Document the fix in CHANGELOG.md and 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.

Comment thread .github/workflows/release.yml Resolved
Comment thread .github/workflows/release.yml Resolved
Comment thread .github/workflows/release.yml Resolved
- 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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/release.yml Resolved
Avoid gh api --paginate with --jq (per-page output). Use --slurp and a single jq pass.

Refs: #438
@c-vigo
c-vigo enabled auto-merge March 25, 2026 12:03
@c-vigo
c-vigo merged commit a1bcd94 into release/0.3.1 Mar 25, 2026
12 checks passed
@c-vigo
c-vigo deleted the bugfix/438-smoke-test-dispatch-rc20 branch March 25, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants