Skip to content

Smoke Copilot: grant PR write permissions required by safe outputs - #6366

Merged
lpcox merged 2 commits into
centralize-mount-policyfrom
copilot/fix-with-copilot
Jul 18, 2026
Merged

Smoke Copilot: grant PR write permissions required by safe outputs#6366
lpcox merged 2 commits into
centralize-mount-policyfrom
copilot/fix-with-copilot

Conversation

Copilot AI commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

The Smoke Copilot workflow was failing in Execute GitHub Copilot CLI because the prompt requires add_comment/add_labels on PR triggers, while workflow permissions only allowed read access for issues and pull-requests. This change aligns workflow permissions with the configured safe-output behavior.

  • Scope of change

    • Updated /home/runner/work/gh-aw-firewall/gh-aw-firewall/.github/workflows/smoke-copilot.md
    • Updated /home/runner/work/gh-aw-firewall/gh-aw-firewall/.github/workflows/smoke-copilot.lock.yml to keep compiled output in sync
  • Permission alignment

    • issues: readissues: write
    • pull-requests: readpull-requests: write
    • Kept existing copilot-requests: write and other permissions unchanged
  • Resulting behavior

    • On pull_request runs, safe outputs can now post comment/label actions as intended by the workflow prompt and post-step checks.
permissions:
  contents: read
  pull-requests: write
  issues: write
  actions: read
  copilot-requests: write

Copilot AI changed the title [WIP] Fix issues with Copilot integration Smoke Copilot: grant PR write permissions required by safe outputs Jul 18, 2026
Copilot finished work on behalf of lpcox July 18, 2026 15:14
Copilot AI requested a review from lpcox July 18, 2026 15:14
@lpcox
lpcox marked this pull request as ready for review July 18, 2026 15:21
Copilot AI review requested due to automatic review settings July 18, 2026 15:21
@lpcox
lpcox merged commit ecae199 into centralize-mount-policy Jul 18, 2026
1 check passed
@lpcox
lpcox deleted the copilot/fix-with-copilot branch July 18, 2026 15:21

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

Aligns Smoke Copilot permissions with PR safe-output actions.

Changes:

  • Grants write access for issues and pull requests.
  • Mirrors permissions in the compiled workflow.
Show a summary per file
File Description
.github/workflows/smoke-copilot.md Updates source permissions.
.github/workflows/smoke-copilot.lock.yml Updates generated job permissions; metadata needs regeneration.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment on lines +447 to +448
issues: write
pull-requests: write
lpcox added a commit that referenced this pull request Jul 18, 2026
PR #6366 changed the smoke-copilot agent job to issues:write /
pull-requests:write, but the gh-aw compiler (v0.82.13) forbids write
permissions on the agent job — writes must flow through safe-outputs'
scoped app token. As a result the lock file's frontmatter_hash could
not be regenerated and stayed at the read-perm value (008d5a5c), while
the .md advertised write perms.

This mismatch made the 'Check workflow lock file' activation step fail
on every open PR (CI builds the branch merged with main), e.g. #6362,
even for PRs that never touched smoke-copilot.

Revert issues/pull-requests to read (safe-outputs already handles the
comment/label writes) and recompile so .md and lock are consistent.


Copilot-Session: 23717692-af7a-4e03-a156-5b696c3f01bd

Co-authored-by: Copilot App <223556219+Copilot@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.

3 participants