Skip to content

fix(ci): skip agentic workflow activation for bot-triggered pull requests#1250

Merged
lpcox merged 2 commits intoclaude/fix-issue-20590from
copilot/66727535105-fix-github-actions-workflow
Mar 12, 2026
Merged

fix(ci): skip agentic workflow activation for bot-triggered pull requests#1250
lpcox merged 2 commits intoclaude/fix-issue-20590from
copilot/66727535105-fix-github-actions-workflow

Conversation

Copy link
Contributor

Copilot AI commented Mar 12, 2026

The compute_text.cjs action (gh-aw v0.47.0) calls GET /repos/{owner}/{repo}/collaborators/{username}/permission during activation, which returns 404 for bot accounts — causing unhandled failures when copilot-swe-agent[bot] (actor login: Copilot) opens or synchronizes a PR.

Changes

  • 5 workflow lock files (smoke-copilot, smoke-claude, smoke-codex, smoke-chroot, security-guard): tighten the activation job if condition to exclude bot-triggered PR events
# Before
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.id == github.repository_id)

# After
if: (github.event_name != 'pull_request' || (github.event.pull_request.head.repo.id == github.repository_id && github.event.sender.type != 'Bot'))

Schedule and workflow_dispatch triggers are unaffected. Human-created PRs continue to activate normally.

Original prompt

Fix the failing GitHub Actions workflow activation
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 66727535105
Job URL: https://github.com/github/gh-aw-firewall/actions/runs/22982154382/job/66727535105


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

…ests

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] [66727535105] Fix the failing GitHub Actions workflow activation fix(ci): skip agentic workflow activation for bot-triggered pull requests Mar 12, 2026
@lpcox lpcox marked this pull request as ready for review March 12, 2026 03:04
Copilot AI review requested due to automatic review settings March 12, 2026 03:04
@lpcox lpcox merged commit efaa06a into claude/fix-issue-20590 Mar 12, 2026
@lpcox lpcox deleted the copilot/66727535105-fix-github-actions-workflow branch March 12, 2026 03:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates GitHub Actions workflow activation gating to avoid failures when bot accounts trigger pull request events (due to collaborator permission checks returning 404 for bots).

Changes:

  • Tighten activation job if conditions across multiple workflow lock files to skip activation on bot-triggered pull_request events.
  • Preserve existing behavior for non-PR events and for PRs from forks (still skipped).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/smoke-copilot.lock.yml Skip activation for bot-triggered PRs to prevent activation-time permission lookup failures
.github/workflows/smoke-codex.lock.yml Same activation gating change for codex smoke workflow
.github/workflows/smoke-claude.lock.yml Same activation gating change for claude smoke workflow
.github/workflows/smoke-chroot.lock.yml Same activation gating change for chroot smoke workflow
.github/workflows/security-guard.lock.yml Same activation gating change for security guard workflow

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

You can also share your feedback on Copilot code review. Take the survey.

jobs:
activation:
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.id == github.repository_id)
if: (github.event_name != 'pull_request' || (github.event.pull_request.head.repo.id == github.repository_id && github.event.sender.type != 'Bot'))
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

This condition disables activation for all bot-authored PRs (e.g., Dependabot and any GitHub App bots), not just copilot-swe-agent[bot]. If activation should still run for some bots, consider narrowing the check to a specific actor/login (e.g., github.event.sender.login != 'Copilot') or using an allow/deny list so the operational impact is intentional. (Applies equally to the same if change in the other workflow lock files in this PR.)

Suggested change
if: (github.event_name != 'pull_request' || (github.event.pull_request.head.repo.id == github.repository_id && github.event.sender.type != 'Bot'))
if: (github.event_name != 'pull_request' || (github.event.pull_request.head.repo.id == github.repository_id && github.event.sender.login != 'copilot-swe-agent[bot]'))

Copilot uses AI. Check for mistakes.
lpcox added a commit that referenced this pull request Mar 12, 2026
…#1249)

* Initial plan

* feat: add openai/anthropic api target flags for custom endpoints

* Update src/cli.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(proxy): warn when custom api targets are not in --allow-domains

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

* fix(ci): skip agentic workflow activation for bot-triggered pull requests (#1250)

* Initial plan

* fix(ci): skip agentic workflow activation for bot-triggered pull requests

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

* fix: resolve pid-tracker integration test failure and add missing test coverage for API target validation (#1251)

* Initial plan

* fix: resolve failing Build and Lint (Node 22) CI workflow

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

* fix(ci): remove unused Setup Scripts step from update_cache_memory jobs (#1252)

* Initial plan

* fix(ci): remove unused Setup Scripts step from update_cache_memory jobs

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

* docs(proxy): document --openai-api-target and --anthropic-api-target in api-proxy-sidecar.md

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

* fix: resolve test coverage regression and locked PR comment failure (#1254)

* Initial plan

* fix: resolve coverage regression and locked PR comment failure

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

---------

Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com>
Co-authored-by: Landon Cox <landon.cox@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@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