Relax approval gating for low-risk PR automations#53480
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates PR automations to avoid approval-gated runs while preserving trusted checkout and routing behavior.
Changes:
- Uses
pull_request_targetfor affected workflows. - Normalizes target events for centralized routing.
- Checks out trusted base history for PR description generation.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/central_slash_command_workflow.go |
Generates target-context PR triggers. |
pkg/workflow/central_slash_command_workflow_test.go |
Updates trigger-generation assertions. |
actions/setup/js/route_slash_command.cjs |
Normalizes target events during routing. |
actions/setup/js/route_slash_command.test.cjs |
Tests target-event dispatch. |
.github/workflows/pr-description-caveman.md |
Uses a trusted base checkout. |
.github/workflows/pr-description-caveman.lock.yml |
Regenerates the compiled workflow. |
.github/workflows/label-closed-prs.yml |
Moves closure labeling to target context. |
.github/workflows/agentic_commands.yml |
Updates generated command routing trigger. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 8/8 changed files
- Comments generated: 2
- Review effort level: Balanced
| if (context.eventName === "pull_request_target") { | ||
| return "pull_request"; |
There was a problem hiding this comment.
Fixed in b6a2da5: both dispatch paths now override event_type with the normalized identifier before serializing aw_context, and the pull_request_target test asserts awContext.event_type === "pull_request".
| checkout: | ||
| repository: ${{ github.repository }} | ||
| ref: ${{ github.event.pull_request.base.sha }} | ||
| fetch-depth: 0 |
There was a problem hiding this comment.
Fixed in b6a2da5: added an explicit git fetch origin "refs/pull/${PR_NUMBER}/head:refs/gh-aw/pr-${PR_NUMBER}/head" before the diff commands so the fork's head commit is present locally without checking it out.
|
Hey ✅ What's working here:
The PR is ready for review and merge!
|
|
@copilot PR sous-chef triage: branch refresh was requested. Please investigate the current
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Investigated the UNSTABLE state: the branch had an out-of-date generated |
|
@copilot PR sous-chef triage: branch refresh was requested. Please run the
|
Re-verified the branch: working tree is clean, |
|
@copilot Please address these unresolved review threads (newest first):
Please refresh the branch if needed and run the
|
… PR head ref before diffing Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Addressed both threads in b6a2da5: |
Several automation workflows were entering
action_requiredbefore any job ran, blocking routine safe-output updates and obscuring run history. The affected runs were PR-triggered automations where the approval gate fired before branch-skip conditions could evaluate.Use target-context PR triggers
pull_request_target.pull_request_targetso same-repo automation events do not stall before dispatch.Keep routing semantics stable
pull_request_targetback topull_requestinside the central router so existing route metadata continues to match.Avoid untrusted head checkout
Run: https://github.com/github/gh-aw/actions/runs/32076538787> Generated by 👨🍳 PR Sous Chef · gpt54 · 12.2 AIC · ⌖ 7.86 AIC · ⊞ 8.8K · ◷