Skip to content

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

Merged
pelikhan merged 13 commits intomainfrom
copilot/update-compiler-label-command-support
Mar 16, 2026
Merged

feat: add label-command trigger (On Label Command)#21118
pelikhan merged 13 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.



✨ PR Review Safe Output Test - Run 23126604129

💥 [THE END] — Illustrated by Smoke Claude ·

Copilot AI and others added 2 commits March 15, 2026 20:49
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…fy owner/repo extraction

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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

Choose a reason for hiding this comment

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

Agreed — the smoke test agent noticed this too during review. The test name implies it covers a clash scenario, but the workflow content only has schedule alongside label_command, not an actual issues/pull_request/discussion with types: [labeled]. A real clash test would verify the YAML merge logic.

📰 BREAKING: Report filed by Smoke Copilot

… (smoke label)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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 <223556219+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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:

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
… 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 <4175913+pelikhan@users.noreply.github.com>
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:

@pelikhan pelikhan added smoke and removed smoke labels Mar 16, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions github-actions bot removed the smoke label Mar 16, 2026
@github-actions
Copy link
Contributor

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.53.0
jq 1.7
yq v4.52.4
curl 8.5.0
gh 2.87.3
node v20.20.0
python3 3.12.3
go 1.24.13
java 10.0.102
dotnet 10.0.102

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test ·

@github-actions
Copy link
Contributor

Smoke Test: Codex Engine Validation
PRs: #21137 [instructions] Sync github-agentic-workflows.md with v0.40.1; #21140 [docs] docs(mcp-scripts): remove redundant content (21% reduction)
GitHub MCP (2 merged PR titles): ✅
Serena MCP (activate + symbol search >=3): ✅
Playwright (github.com title contains "GitHub"): ✅
web-fetch (https://github.com contains "GitHub"): ✅
File write (/tmp/gh-aw/agent/smoke-test-codex-23126604120.txt): ✅
Bash cat verification: ✅
Build (GOCACHE/GOMODCACHE set in /tmp/gh-aw/agent, make build): ✅
Overall status: PASS

🔮 The oracle has spoken through Smoke Codex ·

Warning

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • ab.chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"

See Network Configuration for more information.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Smoke test review of PR #21118 (label-command trigger). The remove_trigger_label.cjs implementation looks solid overall — good handling of workflow_dispatch, discussion GraphQL path, and 404 tolerance. Two minor observations: (1) label validation before removal, (2) letconst for labelNames.

📰 BREAKING: Report filed by Smoke Copilot

try {
labelNames = JSON.parse(labelNamesJSON);
if (!Array.isArray(labelNames)) {
core.setFailed(`${ERR_CONFIG}: Configuration error: GH_AW_LABEL_NAMES must be a JSON array.`);
Copy link
Contributor

Choose a reason for hiding this comment

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

The GH_AW_LABEL_NAMES env var is parsed but only the context.payload?.label?.name is used for removal. If the labeled event fires for a label that is NOT in labelNames, the step still removes it and sets label_name to the triggering label. Consider validating that triggerLabel is included in labelNames before removing, to avoid accidentally removing unrelated labels.

core.setFailed(`${ERR_CONFIG}: Configuration error: Failed to parse GH_AW_LABEL_NAMES: ${getErrorMessage(error)}`);
return;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nit: labelNames is declared with let but never reassigned after the JSON.parse. Consider using const here for clarity.

@github-actions
Copy link
Contributor

Commit pushed: eb5c443

Generated by Changeset Generator

@pelikhan
Copy link
Contributor

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

Smoke Test Results — Run §23126604129

Core: ✅ GitHub MCP ✅ mcpscripts-gh ✅ Serena ✅ Make Build ✅ Playwright ✅ Tavily ✅ File Write ✅ Bash ✅ Discussion ✅ AW Status

PR Review: ✅ Update PR ✅ Review Comments ✅ Submit Review ⚠️ Resolve Thread ✅ Add Reviewer ✅ Push Branch ⚠️ Close PR

Overall: PARTIAL (2 skipped, 0 failed)

💥 [THE END] — Illustrated by Smoke Claude ·

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

💥 Automated smoke test review - all systems nominal!

💥 [THE END] — Illustrated by Smoke Claude

@@ -2,9 +2,7 @@
on:
slash_command:
name: cloclo
Copy link
Contributor

Choose a reason for hiding this comment

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

Clean simplification — replacing the explicit issues: types: [labeled] + names: block with a single label_command: cloclo line is much more readable. The intent is immediately clear.

core.info(`Event ${eventName} has no label payload – skipping label removal.`);
core.setOutput("label_name", "");
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Good defensive check here — verifying triggerLabel exists before proceeding prevents cryptic downstream failures. The early return with empty output is the right pattern for non-fatal skips.

@pelikhan pelikhan merged commit 840540b into main Mar 16, 2026
1 check failed
@pelikhan pelikhan deleted the copilot/update-compiler-label-command-support branch March 16, 2026 03:37
Copilot stopped work on behalf of pelikhan due to an error March 16, 2026 03:37
github-actions bot added a commit that referenced this pull request Mar 16, 2026
…igger

Add two new glossary entries based on recent changes:

- Ecosystem Identifiers: Named shorthand references to predefined domain
  sets (python, node, go, github, dev-tools, local, default-safe-outputs)
  used in network.allowed and safe-outputs.allowed-domains. Includes
  the new default-safe-outputs compound ecosystem identifier (renamed
  from default-redaction in #21114).

- Label Command Trigger (label_command): New trigger type from #21118
  that activates when a specific label is added to an issue, PR, or
  discussion. The label is automatically removed on activation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants