Skip to content

Add label_dispatch trigger and generated cross-repo .remote.yml bridge workflows#34836

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/gh-aw-central-label-triggers
Closed

Add label_dispatch trigger and generated cross-repo .remote.yml bridge workflows#34836
Copilot wants to merge 2 commits into
mainfrom
copilot/gh-aw-central-label-triggers

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

This change adds a first-class on.label_dispatch trigger for CentralRepoOps-style label routing across repositories. Instead of trying to make cross-repo label events native in a single workflow, the compiler now emits a bridge pattern directly: a central repository_dispatch listener plus a generated remote label-trigger workflow.

  • Trigger model

    • Added on.label_dispatch support in frontmatter extraction and workflow data.
    • Supports:
      • shorthand: label_dispatch: ns-pattern-review
      • object: label_dispatch: { label, allowed-repos }
    • Added schema coverage in main_workflow_schema.json.
  • Central workflow compilation

    • When label_dispatch is present, compiled on: now includes:
      • repository_dispatch with workflow-specific event type (gh_aw_label_dispatch__<workflow-id>)
      • workflow_dispatch fallback
    • Injects a dispatch guard condition checking:
      • client_payload.trigger_label
      • optional repo allowlist matching from allowed-repos (owner/repo, owner/*, *).
  • Generated remote bridge workflow

    • Added post-processing generator for <workflow-id>.remote.yml.
    • Generated bridge workflow:
      • listens on pull_request labeled
      • validates trigger label and optional allowed repos
      • dispatches to the central repo via repos.createDispatchEvent with typed payload fields:
        target_repo, pr_number, head_sha, base_sha, trigger_label, delivery_id, actor
    • Removes stale .remote.yml when label_dispatch is removed.
  • Docs

    • Added Label Dispatch Trigger (label_dispatch) section to trigger reference with CentralRepoOps bridge semantics.
on:
  label_dispatch:
    label: ns-pattern-review
    allowed-repos:
      - my-org/*

… generation

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for central label triggers in GitHub Actions workflows Add label_dispatch trigger and generated cross-repo .remote.yml bridge workflows May 26, 2026
Copilot AI requested a review from pelikhan May 26, 2026 02:31
@pelikhan pelikhan closed this May 26, 2026
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.

Question: Can gh-aw support central label triggers across repositories?

2 participants