Skip to content

Suggested test: copilot/repository-dispatch-bots-allowlist #18154

Open

Description

@github-actions

Motivation

github/gh-aw#63492 — Fixes on.bots: so an allowlisted GitHub App sender of a repository_dispatch event is authorized even though App identities are never collaborators (previously always resolved to permission none and the run was skipped).

Proposed test

  • Workflow file: test-copilot-repository-dispatch-bots-allowlist.md
  • Trigger: repository_dispatch (custom event type, e.g. agent-handoff) with on.bots: [...]
  • Engine: copilot
  • Safe output: create-issue
  • Variant: standard

Minimal test prompt sketch

Dispatch a repository_dispatch event (e.g. via gh api repos/.../dispatches using GH_AW_TEST_PAT) with a custom event type, and have the workflow's on.bots: allowlist an actor. The agent creates a single issue confirming it ran, proving the repository_dispatch + on.bots: gate passed pre-activation.

New fixtures or secrets needed

Requires a way for the harness to trigger repository_dispatch as a GitHub App-authenticated actor (not just a PAT), which is the crux of the bug (App senders vs. collaborator lookup). e2e.sh currently has no helper for firing repository_dispatch events or asserting App-vs-PAT actor identity — this may need e2e.sh support or a lighter smoke test that just verifies on.bots: config compiles and a PAT-triggered repository_dispatch still activates normally.

Notes

Open suggestion #13852 ("copilot/on-bots-import-from-shared-workflow") covers on.bots: merging via imports, not repository_dispatch App-actor authorization — no overlap. This is speculative pending confirmation that the harness can simulate a GitHub App actor for repository_dispatch; recommend triage before conversion to a PR.

Generated by 🔍 Suggest New E2E Tests · copilot · auto · 87.9 AIC · ⌖ 6.72 AIC · ⊞ 8.6K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions