Skip to content

Disable checkout for PR risk classifier - #879

Merged
Quim Muntal (qmuntal) merged 1 commit into
mainfrom
fix/risk-classifier-fork-checkout
Aug 21, 2026
Merged

Disable checkout for PR risk classifier#879
Quim Muntal (qmuntal) merged 1 commit into
mainfrom
fix/risk-classifier-fork-checkout

Conversation

@qmuntal

Copy link
Copy Markdown
Member

Summary

  • disable repository and PR-branch checkout for the API-only risk classifier
  • regenerate the classifier lock with gh-aw v0.83.4

Rationale

The classifier runs from pull_request_target and reads pull request data through GitHub APIs; it explicitly does not execute contributor code. Its generated agent job nevertheless attempted to check out the PR branch. For fork PRs, gh-aw rejects that checkout when the actor lacks repository write permission, so the workflow failed before inference.

checkout: false removes that unnecessary checkout and lets external-contributor PRs reach classification without weakening the trust boundary.

Failed run: https://github.com/microsoft/agent-framework-go/actions/runs/32364877561/job/96418371409

Validation

  • gh aw --version (v0.83.4)
  • gh aw compile classify-pull-request-risk --strict (0 errors, 0 warnings)
  • gh aw compile --strict (5 workflows, 0 errors, 0 warnings)

The API-only risk classifier does not execute pull request code, but its generated workflow attempted to check out contributor branches. This caused pull_request_target runs for fork PRs to fail when the author lacked write permission. Disable checkout and regenerate the lock with gh-aw v0.83.4.
Copilot AI lite review requested due to automatic review settings August 20, 2026 15:58
@qmuntal
Quim Muntal (qmuntal) requested a review from a team as a code owner August 20, 2026 15:58
@github-actions github-actions Bot added area:github Changes files in the github area size:medium At most 100 changed lines across at most 5 files labels Aug 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Disables repository/PR-branch checkout for the classify-pull-request-risk gh-aw workflow, aligning the generated Actions workflow with the intended API-only execution model for pull_request_target (avoiding fork-permission checkout failures).

Changes:

  • Add checkout: false to the workflow markdown definition to prevent any repo/PR checkout.
  • Regenerate the compiled lock workflow, removing checkout-related steps and outputs.
Show a summary per file
File Description
.github/workflows/classify-pull-request-risk.md Sets checkout: false in the gh-aw frontmatter to disable checkout.
.github/workflows/classify-pull-request-risk.lock.yml Regenerated compiled workflow reflecting checkout removal (steps/outputs related to PR checkout removed).

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

@github-actions github-actions Bot added kind:ci Changes CI, build, or repository automation pending-auto-risk Automatic risk classification is in progress risk:low Limited blast radius and straightforward rollback and removed pending-auto-risk Automatic risk classification is in progress labels Aug 20, 2026
@qmuntal
Quim Muntal (qmuntal) added this pull request to the merge queue Aug 21, 2026
Merged via the queue into main with commit 1f91ff8 Aug 21, 2026
30 checks passed
@qmuntal
Quim Muntal (qmuntal) deleted the fix/risk-classifier-fork-checkout branch August 21, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:github Changes files in the github area kind:ci Changes CI, build, or repository automation risk:low Limited blast radius and straightforward rollback size:medium At most 100 changed lines across at most 5 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants