Skip to content

Propagate agent/workflow-edits-allowed label from issues to PRs - #62

Merged
cgwalters merged 1 commit into
mainfrom
agent/propagate-workflow-edits-label-69f92f35f7fe5d6e
Aug 21, 2026
Merged

Propagate agent/workflow-edits-allowed label from issues to PRs#62
cgwalters merged 1 commit into
mainfrom
agent/propagate-workflow-edits-label-69f92f35f7fe5d6e

Conversation

@bootc-bot

@bootc-bot bootc-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #61

When an issue has the agent/workflow-edits-allowed label, the drafter workflow now propagates it to the pull request it creates. This allows subsequent fix iterations (via fix.md) to push changes to protected files without hitting the request_review gate.

Changes

Modified .github/workflows/drafter.md to add two new steps in the agent's task instructions:

  • Step 6: Check if the originating issue has the agent/workflow-edits-allowed label
  • Step 7 (renumbered from 6): When creating the PR, include the label if present on the issue

Why This Fixes #61

The issue occurred because:

  1. Issue had agent/workflow-edits-allowed label
  2. Drafter created a PR but didn't copy the label
  3. Fix workflow tried to push changes to protected files
  4. Push failed because PR lacked the agent/workflow-edits-allowed label

With this change, the label is propagated from issue → PR, allowing the fix workflow to complete successfully.

Validation

  • Compiled workflow lockfiles successfully with gh aw compile
  • Verified issue [aw] PR Fix Agent failed #61 has the agent/workflow-edits-allowed label
  • Confirmed the fix workflow already checks for this label on PRs (line 89 of fix.md)
  • Change adds missing step to copy label from issue to PR at creation time

Generated by Drafter for #61 · 76.8 AIC · ⌖ 19.8 AIC · ⊞ 3.1K ·

When an issue has the agent/workflow-edits-allowed label, the drafter
workflow now copies it to the pull request it creates. This allows
subsequent fix iterations (via fix.md) to push changes to protected
files without hitting the request_review gate.

Fixes #61

Generated-by: AI
@bootc-bot bootc-bot Bot mentioned this pull request Aug 21, 2026
@bootc-bot bootc-bot Bot added the agent/lgtm Reviewer agent approved; ready to auto-merge label Aug 21, 2026

@bootc-bot bootc-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review Summary

This PR correctly fixes #61 by ensuring the agent/workflow-edits-allowed label is propagated from issues to pull requests.

What I Checked

Correctness: The fix addresses the root cause identified in #61 — the drafter workflow now instructs the agent to check for the agent/workflow-edits-allowed label on the originating issue and propagate it to the PR at creation time.

Implementation:

  • Step 6 added: Check if originating issue has the label
  • Step 7 (renumbered from 6): Include the label when creating the PR if present
  • Cross-referenced with fix.md:89 which checks for this label on github.event.pull_request.labels.*.name

Lockfile Recompilation:

  • frontmatter_hash unchanged (correct — frontmatter not modified)
  • body_hash changed appropriately (correct — body content changed)

Code Quality: Minimal, focused change with clear rationale documented in the step descriptions.

Safety: Properly propagates an authorization label that must be manually applied to the issue beforehand — no new security risks introduced.

Recommendation

This PR is ready to merge. The change is minimal, correct, and follows repository conventions.

@bootc-bot
bootc-bot Bot marked this pull request as ready for review August 21, 2026 19:19
@bootc-bot bootc-bot Bot removed the agent/lgtm Reviewer agent approved; ready to auto-merge label Aug 21, 2026
@cgwalters

Copy link
Copy Markdown
Collaborator

hmm and the agent would just put this in its safe outputs when creating the PR? I guess that works, and it's kind of hard to do anything better here without making it a skill with a script that does this stuff a bit more deterministically

@cgwalters
cgwalters merged commit 497b4d1 into main Aug 21, 2026
18 of 19 checks passed
bootc-bot Bot added a commit that referenced this pull request Aug 21, 2026
When an issue has the agent/workflow-edits-allowed label, the drafter
workflow now copies it to the pull request it creates. This allows
subsequent fix iterations (via fix.md) to push changes to protected
files without hitting the request_review gate.

Fixes #61

Generated-by: AI

Co-authored-by: bootc-bot[bot] <225049296+bootc-bot[bot]@users.noreply.github.com>
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.

[aw] PR Fix Agent failed

1 participant