Skip to content

feat: add label-command trigger (On Label Command)#21118

Open
Copilot wants to merge 12 commits intomainfrom
copilot/update-compiler-label-command-support
Open

feat: add label-command trigger (On Label Command)#21118
Copilot wants to merge 12 commits intomainfrom
copilot/update-compiler-label-command-support

Conversation

Copy link
Contributor

Copilot AI commented Mar 15, 2026

Adds a new label_command trigger that activates a workflow when a specific label is added to an issue, pull request, or discussion — and automatically removes that label on activation so it can be reapplied to re-trigger.

Frontmatter

# String shorthand — fires on all supported item types
on: "label-command deploy"

# Map form — string value
on:
  label_command: deploy

# Map form — restrict to specific item types
on:
  label_command:
    name: deploy
    events: [issues, pull_request]

Compilation

  • Generates issues, pull_request, and discussion events with types: [labeled], filtered by the optional events field
  • Always adds workflow_dispatch with an item_number input for manual testing; sets HasDispatchItemNumber so entity-number expressions gain || inputs.item_number fallbacks for manual dispatch runs
  • When other events coexist with label_command, merges types arrays and preserves non-types fields (names, branches, etc.) rather than silently dropping overlapping keys
  • When combined with slash_command in the same workflow, label types (labeled) are merged into the existing slash_command event lists and the activation condition becomes (slash_command check) || (label name check)
  • Job if: condition checks github.event.label.name against the configured label names
  • Validation error is raised if issues, pull_request, or discussion triggers with non-label types (e.g. opened) are combined with label_command; label-only types (labeled/unlabeled) are still allowed and merged
  • yaml.Marshal failures during event-map generation now propagate as errors instead of silently producing an empty on: block

Activation job

  • Adds a remove_trigger_label step that removes the label that triggered the run (REST API for issues/PRs, GraphQL for discussions; non-fatal on failure; 404 treated as info — label already removed by another concurrent run)
  • Activation job permissions for label removal are minimal and event-scoped:
    • issues: write is only added when issues or pull_request events are enabled (PR label removal uses the issues REST API)
    • discussions: write is only added when discussion events are enabled
    • When on.github-app is configured, GITHUB_TOKEN elevation is skipped entirely — the remove_trigger_label step uses the app token (minted with only the event-scoped permissions needed) instead
  • Exposes needs.activation.outputs.label_command with the matched label name for use in downstream jobs

Schema

label_command is now a recognised property in the on: object, with name/names and events sub-fields validated against supported values (issues, pull_request, discussion).

Example workflows

  • cloclo: Uses slash_command: cloclo combined with label_command: cloclo. Adding the cloclo label to an issue, PR, or discussion now triggers the workflow (label is removed automatically) alongside the existing /cloclo slash command.
  • smoke-copilot: Uses label_command: {name: smoke, events: [pull_request]}. Adding the smoke label to a pull request triggers the smoke test run and removes the label automatically.

Documentation

  • Updated docs/src/content/docs/patterns/label-ops.md with a new "Label Command Trigger" section covering syntax variants, label lifecycle (auto-removal), the needs.activation.outputs.label_command output, combining with slash_command:, and a comparison table vs names: filtering.
  • Updated docs/src/content/docs/reference/triggers.md with a new "Label Command Trigger (label_command:)" subsection before "Label Filtering" with a concise syntax reference and link to the LabelOps patterns page.
Original prompt

Update the frontmatter and the compiler to support a new trigger called label-command. It is similar to slash_command in that it simulates a command triggered by adding a label to an issue, discussion, or pull-request, so much of the existing slash_command behavior will apply.

For compilation, the compiler should generate the appropriate on: issues or on: pull_request label-based triggers with GitHub Actions–compatible configuration. It must ensure that the generated on: issues/on: pull_request label configuration does not clash with any existing label-based triggers. It should also allow selecting which event type (issue, discussion, or pull-request) is meant to trigger the workflow, mirroring how slash_command selects its triggering events.

For behavior, when the action is activated by a label-command, it should remove the triggering label from the item as the workflow starts. The user adds the label, the agent starts, and on start the label is removed so that it can be added again later if needed.

The trigger name is On Label Command.


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI changed the title [WIP] Update frontmatter and compiler for label-command functionality feat: add label-command trigger (On Label Command) Mar 15, 2026
Copilot AI requested a review from pelikhan March 15, 2026 20:53
@pelikhan
Copy link
Contributor

Enable label command on "cloclo" agentic workflow and smoke-copilot for "smoke"

@pelikhan
Copy link
Contributor

@copilot Enable label command on "cloclo" agentic workflow and smoke-copilot for "smoke"

@pelikhan pelikhan marked this pull request as ready for review March 15, 2026 21:05
Copilot AI review requested due to automatic review settings March 15, 2026 21:05
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

Adds a new label_command workflow trigger that activates on label application (issues/PRs/discussions), generates appropriate on: events + workflow_dispatch, and removes the triggering label at workflow start so it can be re-applied.

Changes:

  • Extend frontmatter parsing/schema and compiler defaults to support label_command (including shorthand on: "label-command <name>").
  • Generate label-based on: blocks (issues/pull_request/discussion with types: [labeled]) plus workflow_dispatch with item_number.
  • Add activation-job support to remove the triggering label via a new remove_trigger_label.cjs github-script helper, and expose a label_command output.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
pkg/workflow/tools.go Detects label-command workflows; generates on: events and if: condition; adjusts concurrency handling.
pkg/workflow/schedule_preprocessing.go Adds label-command <name> shorthand expansion in on: string preprocessing.
pkg/workflow/label_command_test.go New unit tests for shorthand expansion, event filtering, condition building, and compilation output.
pkg/workflow/label_command_parser.go Adds shorthand expansion helper for label_command.
pkg/workflow/label_command.go Adds supported event filtering + label-command condition builder.
pkg/workflow/frontmatter_extraction_yaml.go Extracts on.label_command config (name/names + events).
pkg/workflow/compiler_types.go Adds LabelCommand* fields to WorkflowData.
pkg/workflow/compiler_safe_outputs.go Detects label_command in on: and stages mergeable events for defaults generation.
pkg/workflow/compiler_orchestrator_workflow.go Wires label-command extraction into compilation pipeline.
pkg/workflow/compiler_activation_job.go Adds remove_trigger_label step + label_command output in activation job.
pkg/parser/schemas/main_workflow_schema.json Adds on.label_command schema with name/names and events.
pkg/constants/constants.go Adds step ID constant for remove_trigger_label.
actions/setup/js/remove_trigger_label.cjs Implements label removal for issues/PRs (REST) and discussions (GraphQL).

💡 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.

if err != nil {
return nil, fmt.Errorf("failed to marshal label-command names: %w", err)
}
steps = append(steps, fmt.Sprintf(" GH_AW_LABEL_NAMES: %q\n", string(labelNamesJSON)))
steps = append(steps, generateGitHubScriptWithRequire("remove_trigger_label.cjs"))

// Expose the matched label name as a job output for downstream jobs to consume
outputs["label_command"] = fmt.Sprintf("${{ steps.%s.outputs.label_name }}", constants.RemoveTriggerLabelStepID)
"type": "string",
},
},
}
Comment on lines +150 to +158
if len(data.LabelCommandOtherEvents) > 0 {
for eventKey, eventVal := range data.LabelCommandOtherEvents {
if _, exists := labelEventsMap[eventKey]; exists {
// Event already present from label_command generation — keep ours
// (the condition handles filtering by label name at job level)
continue
}
labelEventsMap[eventKey] = eventVal
}
Comment on lines +163 to +169
if err == nil {
yamlStr := strings.TrimSuffix(string(mergedEventsYAML), "\n")
yamlStr = parser.QuoteCronExpressions(yamlStr)
// Pass frontmatter so label names in "names:" fields get commented out
yamlStr = c.commentOutProcessedFieldsInOnSection(yamlStr, map[string]any{})
data.On = yamlStr
}
Comment on lines +144 to 162
// Detect label_command trigger
if _, hasLabelCommandKey := onMap["label_command"]; hasLabelCommandKey {
hasLabelCommand = true
// Set default label names from WorkflowData if already populated by extractLabelCommandConfig
if len(workflowData.LabelCommand) == 0 {
// extractLabelCommandConfig has not been called yet or returned nothing;
// set a placeholder so applyDefaults knows this is a label-command workflow.
// The actual label names will be extracted from the frontmatter in applyDefaults
// via extractLabelCommandConfig which was called in parseOnSectionRaw.
baseName := strings.TrimSuffix(filepath.Base(markdownPath), ".md")
workflowData.LabelCommand = []string{baseName}
}
// Clear the On field so applyDefaults will handle label-command trigger generation
workflowData.On = ""
}

// Extract other (non-conflicting) events excluding slash_command, command, label_command, reaction, status-comment, and stop-after
otherEvents = filterMapKeys(onMap, "slash_command", "command", "label_command", "reaction", "status-comment", "stop-after", "github-token", "github-app")
}
Comment on lines +370 to +387
// TestLabelCommandNoClashWithExistingLabelTrigger verifies that label_command can coexist
// with a regular label trigger without creating a duplicate issues: YAML block.
func TestLabelCommandNoClashWithExistingLabelTrigger(t *testing.T) {
tempDir := t.TempDir()

// Workflow that has both a regular label trigger (schedule via default) and label_command
workflowContent := `---
name: No Clash Test
on:
label_command: deploy
schedule:
- cron: "0 * * * *"
engine: copilot
---

Both label-command and scheduled trigger.
`

Copy link
Contributor Author

Copilot AI commented Mar 15, 2026

@copilot Enable label command on "cloclo" agentic workflow and smoke-copilot for "smoke"

Done in d8365f0.

cloclo.md: replaced issues: {types: [labeled], names: [cloclo]} with label_command: cloclo. The compiler was also updated to support slash_command + label_command in the same workflow — label events (issues/pull_request/discussion with types: [labeled]) are now merged into the existing slash_command events, and the activation condition is (slash_command check) || (label name == 'cloclo').

smoke-copilot.md: replaced pull_request: {types: [labeled], names: ["smoke"]} with label_command: {name: smoke, events: [pull_request]}. Both workflows now get the automatic label removal step in the activation job and a label_command output.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE go env ck &#39;scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE go m/_n�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha -ignore_readdir_race -lname /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -exec touch -c /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build2211112642/b079/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --local .cfg 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -unreachable=false /tmp/go-build2211112642/b211/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha se 1112642/b210/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha se 1112642/b219/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha se 1112642/b199/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha se 1112642/b215/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha se 1112642/b222/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha se 1112642/b214/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha se 1112642/b205/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha get .cfg 64/pkg/tool/linux_amd64/vet http.https://gitgit (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility /tmp/go-build386remote.origin.url -trimpath r: $owner, name: $name) { hasDiscussionsEnabled } } -p main -lang=go1.25 go env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha --get-regexp .cfg 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha --get-regexp .cfg 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh -c npx prettier --cGOSUMDB GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go sh (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan
Copy link
Contributor

@copilot update label ops doc page (use tech writer agent)

@pelikhan
Copy link
Contributor

@copilot merge main

Copilot AI and others added 2 commits March 15, 2026 21:41
Add a new 'Label Command Trigger' section explaining:
- One-shot command semantics (label auto-removed after trigger)
- All frontmatter syntax variants (shorthand, map, events restriction, multiple names)
- workflow_dispatch added for manual testing
- Accessing matched label via needs.activation.outputs.label_command
- Combining label_command with slash_command in the same workflow
- NOTE callout about required write permission

Update the 'Label Filtering' section to clarify it is for state-based
routing where the label stays on the item. Add a comparison table
between label_command and names: filtering to help users choose.

Co-authored-by: Copilot <[email protected]>
Copy link
Contributor Author

Copilot AI commented Mar 15, 2026

@copilot update label ops doc page (use tech writer agent)

Done in 36f9f3a (label-ops.md) and 446975f (triggers.md).

label-ops.md: Added a new "Label Command Trigger" section covering the label_command syntax (shorthand, map form, events restriction, multiple names), the auto-removal behaviour, the needs.activation.outputs.label_command output, combining with slash_command:, and a comparison table vs names: filtering.

triggers.md: Added a new "Label Command Trigger (label_command:)" subsection before "Label Filtering" with a concise syntax reference and link to the label-ops patterns page.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh auth status (http block)
    • Triggering command: /usr/bin/gh gh pr list --head copilot/update-compiler-label-command-support (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Contributor Author

Copilot AI commented Mar 15, 2026

@copilot merge main

Done in 2e28c38. Merged main, resolved the single conflict in smoke-copilot.lock.yml (metadata hash), rebuilt the binary, and recompiled all 172 workflows successfully.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw 0hrx70CFqOLM (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -embedcfg /tmp/go-build3789535067/b278/embedcfg -pack (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan
Copy link
Contributor

@copilot multi workflows may be removing the label so it is ok if the remove operation fails because the label is not present

@pelikhan
Copy link
Contributor

Copy link
Contributor Author

Copilot AI commented Mar 15, 2026

@copilot multi workflows may be removing the label so it is ok if the remove operation fails because the label is not present

Done in 000bada. The catch block in remove_trigger_label.cjs now checks the error's status field: a 404 logs core.info ("Label is no longer present – already removed by another run") instead of a warning, while all other errors still log core.warning.

@pelikhan
Copy link
Contributor

@copilot review all code review comments

Copy link
Contributor Author

Copilot AI commented Mar 15, 2026

@copilot fix https://github.com/github/gh-aw/actions/runs/23120739981/job/67154210339

The CI failure at run 23120739981 was on commit 9f70032 (a "merge main" commit), where smoke-copilot.lock.yml had a hash mismatch. This was already resolved in commit 000bada, which updated smoke-copilot.lock.yml alongside the 404 fix. The TestHashConsistencyAcrossLockFiles and all pkg/parser tests pass on the current HEAD.

- Fix GH_AW_LABEL_NAMES env var: use single-quoted YAML string ('["deploy"]')
  instead of %q-formatted string to pass raw JSON array to remove_trigger_label.cjs
- Add issues:write and discussions:write permissions to activation job when
  label_command is configured so label removal calls succeed
- Set HasDispatchItemNumber=true when label_command injects workflow_dispatch,
  enabling inputs.item_number fallbacks in expression mappings and concurrency keys
- Improve LabelCommandOtherEvents merge: union types arrays and preserve
  non-types fields instead of silently dropping overlapping keys
- Return error from applyDefaults when yaml.Marshal fails for label-command events
- Add conflict validation in compiler_safe_outputs: reject issues/pull_request/
  discussion triggers with non-label types alongside label_command
- Fix TestLabelCommandNoClashWithExistingLabelTrigger: use actual issues:labeled
  trigger to test real key-clash merge; add TestLabelCommandConflictWithNonLabelTrigger

Co-authored-by: pelikhan <[email protected]>
Copy link
Contributor Author

Copilot AI commented Mar 15, 2026

@copilot review all code review comments

Addressed all 7 code review comments in be2a502:

  1. GH_AW_LABEL_NAMES format — changed from %q (double-quoted string-in-string) to single-quoted YAML '["deploy"]' so JSON.parse() receives a proper array string
  2. Missing permissions — activation job now gets issues: write + discussions: write when label_command is configured
  3. HasDispatchItemNumber not set — now set to true when label_command injects workflow_dispatch, enabling || inputs.item_number fallbacks in expression mappings
  4. Silent event dropsLabelCommandOtherEvents merge now unions types arrays and preserves other fields (names, branches, etc.) instead of skipping overlapping keys
  5. yaml.Marshal error ignored — now returns an error immediately instead of silently leaving data.On empty
  6. Conflict validation — added check that rejects issues/pull_request/discussion triggers with non-label types alongside label_command (label-only types are still allowed and merged)
  7. Weak testTestLabelCommandNoClashWithExistingLabelTrigger now uses an actual issues: types: [labeled] block to test real key-clash merging; added TestLabelCommandConflictWithNonLabelTrigger for the validation error path

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw fflib (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw %H %ct %D (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha -c go /usr/bin/git -json GO111MODULE 64/bin/go git init�� GOMODCACHE go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha runs/20260315-225258-46244/test-3879915139 git /usr/bin/git s/test.md go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel 2703170/b419/strrev-parse /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel git 0/x64/bin/node --show-toplevel git /usr/bin/git 0/x64/bin/node js/f�� mber }}: ${{ github.event.issue.title }} git /opt/hostedtoolcache/node/24.14.0/x64/bin/node --show-toplevel git /usr/bin/git node (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha -json GO111MODULE ache/node/24.14.0/x64/bin/node GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/compile t-11�� bility_SameInputSameOutput2849200578/001/stability-test.md -trimpath /usr/bin/git -p main -lang=go1.25 git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha runs/20260315-225258-46244/test-2113799406/.github/workflows git /usr/bin/tail --show-toplevel go /usr/bin/git tail -20 ache/go/1.25.0/x--show-toplevel git ache/node/24.14.0/x64/bin/node --show-toplevel go x86_64/node infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha bot-detection.md git /usr/bin/git 4 -type d -namegit x_amd64/vet /usr/bin/git git rev-�� --show-toplevel git ache/node/24.14.0/x64/bin/node --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha b/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE prettier --ch�� 0/001/test-empty-frontmatter.md **/*.ts x_amd64/vet --ignore-path ../../../.prettirev-parse 64/bin/go x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha user.name Test User /usr/bin/infocmp -json GO111MODULE 64/bin/go infocmp -1 xterm-color go /usr/bin/git -json GO111MODULE x_amd64/vet git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git 5049-41313/test-git GO111MODULE .cfg git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha GOMODCACHE go /usr/bin/git -json GO111MODULE tions/setup/js/n--show-toplevel git init�� GOMODCACHE go r,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,disp--show-toplevel -json flow 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel node /usr/bin/git --check **/*.cjs 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/node GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha go1.25.0 -c=4 -nolocalimports -importcfg /tmp/go-build1202703170/b389/importcfg -pack /tmp/go-build1202703170/b389/_testmain.go env &#39;**/*.ts&#39; &#39;**/*.GOINSECURE GO111MODULE ache/go/1.25.0/xGOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha go1.25.0 -c=4 -nolocalimports -importcfg /tmp/go-build1202703170/b392/importcfg -pack /tmp/go-build1202703170/b392/_testmain.go env &#39;**/*.ts&#39; &#39;**/*.GOINSECURE GO111MODULE ache/go/1.25.0/xGOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha GOMODCACHE go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/link -json GO111MODULE de_modules/.bin/--show-toplevel /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/link -o /tmp/go-build1202703170/b428/timeutil.test resolved$ /usr/bin/git -s -w -buildmode=exe git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha /tmp/gh-aw-test-runs/20260315-225258-46244/test-2546288493/.github/workflows rev-parse /usr/bin/git --show-toplevel go /usr/bin/git git rev-�� --show-toplevel git /opt/hostedtoolcache/node/24.14.0/x64/bin/node e:]]*&#34;\([^&#34;]*\)&#34;git go /usr/bin/git node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha ithub/workflows/blog-auditor.md /opt/hostedtoolcache/node/24.14.0/x64/bin/node ache/node/24.14.0/x64/bin/node tOrdering2012170git 64/pkg/tool/linurev-parse /usr/bin/git git t-33�� sistency_GoAndJavaScript3957457384/001/test-complex-frontmatter-with-tools.md git ache/node/24.14.0/x64/bin/node --show-toplevel git /usr/bin/git node (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha GOMODCACHE (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel git e/git ays.md x_amd64/vet /usr/bin/git e/git rev-�� --show-toplevel git 0/x64/bin/node --show-toplevel go /usr/bin/git 0/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git git rev-�� nt/action/git/ref/tags/v999.999.999 git /opt/hostedtoolcache/node/24.14.0/x64/bin/node --show-toplevel git /usr/bin/git node (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env runs/20260315-225049-41313/test-2524584610 GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel sh 3009/001/go/1.25--show-toplevel git rev-�� --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha --show-toplevel git 0/x64/bin/node --show-toplevel git /usr/bin/git git arne�� --show-toplevel git /usr/bin/git .github/workflowgit gh /usr/bin/git git (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha ath ../../../.pr**/*.json (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE is not installedGO111MODULE env ck &#39;**/*.cjs&#39; &#39;*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility --local cfg r: $owner, name: $name) { hasDiscussionsEnabled } } (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go **/*.ts **/*.json --ignore-path go (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha iQ86vzlHM GO111MODULE 2703170/b401=&gt; GOINSECURE b/gh-aw/pkg/loggrev-parse GOMODCACHE go ortc�� runs/20260315-225049-41313/test-3716386627/.github/workflows stmain.go /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE 2703170/b401/importcfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha 410440/b360/parser.test git 410440/b360/importcfg.link --show-toplevel sh /usr/bin/git Knx9nKZXRLUr-/BiCtQ5AnvbJA49HYz0Qe/aFiqXOrvjBVB6--jq rev-�� ry=1 git che/go-build/14/14f3255807944d51720c4a464afacda0488cbbba2ccebb573b8d59b49153076e-d --show-toplevel x_amd64/vet /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha 570/001/stability-test.md git 0/x64/bin/node /tmp/shared-actigit rev-parse /usr/bin/git git js --show-toplevel git /usr/bin/git .github/workflowgit infocmp /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha itattributes-test979182292/.github/workflows GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go l GOMOD GOMODCACHE go env -json l /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel &#34;golangci-lint rev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel git 0/x64/bin/node --show-toplevel git /usr/bin/git git js ai-moderator.md git /usr/bin/git HEAD .github/workflowrev-parse /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go ngci-lint&#34; ]; thgit GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 git /usr/bin/git --show-toplevel go /usr/bin/git git rev-�� --show-toplevel /usr/bin/git 0/x64/bin/node --get-regexp ^remote\..*\.gh-rev-parse /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE 64/bin/go GOINSECURE GOMOD erignore go estl�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 git /usr/bin/git --show-toplevel go /usr/bin/gh git rev-�� --show-toplevel gh /usr/bin/git download 3 /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE 64/bin/go GOINSECURE GOMOD erignore 51RFpkM/58sERvdoTest User estl�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 git /usr/bin/git --git-dir go /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/node/24.14.0/x64/bin/node /usr/bin/git github.token go /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE /bin/sh (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 git /usr/bin/git --show-toplevel go /usr/bin/git git rev-�� /ref/tags/v8 /usr/bin/git /usr/bin/git -v go /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 git /usr/bin/git --git-dir go /usr/bin/git git rev-�� audit-workflows.md /usr/bin/git /usr/bin/git --get-regexp ^remote\..*\.gh-rev-parse /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE /bin/sh (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 git 0/x64/bin/node --show-toplevel go /opt/hostedtoolc--show-toplevel git t-ha�� vaScript3463926583/001/test-complex-frontmatter-with-tools.md /opt/hostedtoolcache/node/24.14.0/x64/bin/node /usr/bin/git vars.MY_VAR go /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 node /usr/bin/git /home/REDACTED/worgit go /usr/bin/git git rev-�� auto-triage-issues.md /usr/bin/git /usr/bin/git --get-regexp ^remote\..*\.gh-/tmp/fuzz-expr-761635473.js /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 0/x64/lib/node_mGOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE go env */*.ts&#39; &#39;**/*.jsGOSUMDB GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE x_amd64/compile env ty-test.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha ith-tools.md go /usr/bin/git vaScript10091493git GO111MODULE x_amd64/compile git rev-�� --show-toplevel x_amd64/compile /usr/bin/git 2703170/b398/_pkbash GO111MODULE 2703170/b398=&gt; git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel git /usr/bin/git /v3.0.0 git ache/node/24.14.0/x64/bin/node git rev-�� ithub-script/git/ref/tags/v8 git /usr/bin/git bility_SameInputnode git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha -json GO111MODULE 0/x64/lib/node_mGOMODCACHE GOINSECURE GOMOD GOMODCACHE go tion�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel go ctions|TestConcurrency.*Dispatch|TestApply -json (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE tions/setup/nodeGOMODCACHE GOINSECURE GOMOD GOMODCACHE go tion�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE ode GOINSECURE GOMOD GOMODCACHE go tion�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE ache/go/1.25.0/xGOMODCACHE GOINSECURE GOMOD GOMODCACHE go tion�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha -json GO111MODULE de_modules/.bin/GOMODCACHE GOINSECURE GOMOD GOMODCACHE go tion�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha --show-toplevel nly /usr/bin/git ithub/workflows/node l /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel 2703170/b409/_te-1 /usr/bin/infocmpxterm-color git (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha nore --log-level=error 2&gt;&amp;1 ompiler-label-command-support $name) { hasDiscussionsEnabled } } (http block)
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha -json GO111MODULE $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE erignore env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE o fix.&#34;; \ exitrev-parse (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha ty-test.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 2938577189/.github/workflows GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha ed-objects.md 64/pkg/tool/linux_amd64/compile /usr/bin/gh g_.a GO111MODULE ache/go/1.25.0/x--show-toplevel gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq /usr/bin/git iQ86vzlHM GO111MODULE 2703170/b401=&gt; git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel git /usr/bin/git ithub/workflows/node git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git runs/20260315-22node git /opt/hostedtoolcache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE HC/wPHmRHH07drGotDxh6_4/9rUbv3kN-importcfg (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion --show-toplevel go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel x_amd64/link /usr/bin/git git (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE h GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 0/x64/bin/sh GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo /usr/bin/git bot-detection.mdgit GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.0/x64/pkg/tool/linu-tests /usr/bin/git 2703170/b415/_pkgit GO111MODULE 2703170/b415=&gt; git (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build1202703170/b383/cli.test /tmp/go-build1202703170/b383/cli.test -test.testlogfile=/tmp/go-build1202703170/b383/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ndor/bin/sh GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /tmp/go-build578410440/b363/cli.test /tmp/go-build578410440/b363/cli.test -test.paniconexit0 -test.timeout=10m0s -test.count=1 rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git -json GO111MODULE /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/xGOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name --show-toplevel go /usr/bin/git -json GO111MODULE (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan
Copy link
Contributor

@copilot handle permissions so that discussions write is not needed if not enable for label commands only require minimal write permission. Use the on.github-app token if needed

… when configured

- Only add issues:write when issues/pull_request events are in label_command events
- Only add discussions:write when discussion is in label_command events
- When github-app is configured, skip GITHUB_TOKEN elevation and use app token
  for the remove_trigger_label step instead (with event-scoped app token scopes)
- Include label_command in app token minting trigger condition
- Compute FilterLabelCommandEvents once and reuse in both permission blocks

Co-authored-by: pelikhan <[email protected]>
Copy link
Contributor Author

Copilot AI commented Mar 16, 2026

@copilot handle permissions so that discussions write is not needed if not enable for label commands only require minimal write permission. Use the on.github-app token if needed

Done in 38cc6ab. Permissions are now event-scoped:

  • issues: write is only added when issues or pull_request are in the enabled label_command events (PR label removal uses the issues REST API)
  • discussions: write is only added when discussion is in the enabled events

For example, label_command: {events: [pull_request]} only gets issues: write; events: [discussion] only gets discussions: write.

When a github-app is configured on the workflow, the GITHUB_TOKEN elevation is skipped entirely for label removal — instead the remove_trigger_label step uses the app token (steps.activation-app-token.outputs.token) minted with only the event-scoped permissions needed.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD ode-gyp-bin/sh go env ck &#39;scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE go env ck &#39;scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE go m/_n�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ck &#39;**/*.cjs&#39; &#39;*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility &#34;prettier&#34; --cheremote.origin.url bash r: $owner, name: $name) { hasDiscussionsEnabled } } --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go **/*.ts **/*.json --ignore-path go (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha -json GO111MODULE $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha -json GO111MODULE $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE erignore env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)

If you need me to access, download, or install something from one of these locations, you can either:

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants