Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
86ca33f
Add replace-label safe-outputs type for atomic label state transitions
Copilot Jun 20, 2026
07b92ca
Fix code review issues: formatStringList for AllowedRemove, fix test …
Copilot Jun 20, 2026
6c91628
Remove stale field-count comment in safe_outputs_state.go
Copilot Jun 20, 2026
67a3333
Merge branch 'main' into copilot/implement-replace-label-safe-outputs
pelikhan Jun 20, 2026
357e5a0
docs: add replace-label W3C specification
Copilot Jun 20, 2026
31f5eee
Apply replace-label spec: docs, type list, and RL-046 partial failure…
Copilot Jun 20, 2026
005c2ec
style: combine template literal in partial mutation error message
Copilot Jun 20, 2026
7575d69
Merge branch 'main' into copilot/implement-replace-label-safe-outputs
pelikhan Jun 20, 2026
97f3560
docs: add draft ADR for replace-label safe-output type
github-actions[bot] Jun 20, 2026
fc940bd
fix: address PR review feedback on replace-label handler and spec
Copilot Jun 20, 2026
fb5c9e7
fix: clarify 404 error message and RL-046 partial-data detection comment
Copilot Jun 20, 2026
7dbe530
feat: add allowed-transitions support to replace-label safe-output type
Copilot Jun 20, 2026
3362044
refactor: replace add-labels + remove-labels with replace-label in sm…
Copilot Jun 21, 2026
4195b8f
revert: restore smoke workflows to add-labels + remove-labels
Copilot Jun 21, 2026
a072938
Merge remote-tracking branch 'origin/main' into copilot/implement-rep…
Copilot Jun 21, 2026
ff9822e
Merge branch 'main' into copilot/implement-replace-label-safe-outputs
github-actions[bot] Jun 21, 2026
41852c3
Merge remote-tracking branch 'origin/copilot/implement-replace-label-…
Copilot Jun 21, 2026
3580b50
Merge branch 'main' into copilot/implement-replace-label-safe-outputs
github-actions[bot] Jun 21, 2026
2ca86fc
Merge branch 'main' into copilot/implement-replace-label-safe-outputs
pelikhan Jun 22, 2026
f8e35c6
fix: add parentheses to JSDoc type casts in replace_label.cjs to fix …
Copilot Jun 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/replace-label.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .github/aw/safe-outputs-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,22 @@ description: Safe-output reference for update, label, milestone, project, releas
```

When `allowed` is omitted, any labels can be removed.
- `replace-label:` - Atomic label state transition — removes one label and adds another in a single GraphQL request, eliminating the race window of separate remove + add operations

```yaml
safe-outputs:
replace-label:
allowed-add: [approved, done] # Optional: glob patterns for labels that may be added (any allowed if omitted)
allowed-remove: [in-review, pending] # Optional: glob patterns for labels that may be removed (any allowed if omitted)
blocked: ["~*", "*[bot]"] # Optional: blocked label patterns (glob; applies to both add and remove)
required-labels: [triage] # Optional: ALL of these labels must be present on the issue/PR for the operation to run
required-title-prefix: "[Bug]" # Optional: issue/PR title must start with this prefix
max: 5 # Optional: maximum number of replacements (default: 5)
target: "triggering" # Optional: "triggering" (default), "*" (any issue/PR), or number
target-repo: "owner/repo" # Optional: cross-repository
```

The agent calls `replace_label(label_to_remove, label_to_add)`. If the label to remove is not present on the item, only the add is applied (no failure). Labels that do not yet exist in the repository are auto-created with a deterministic pastel color.
- `add-reviewer:` - Add reviewers to pull requests

```yaml
Expand Down
2 changes: 1 addition & 1 deletion .github/aw/syntax-agentic.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ description: Agentic workflow specific frontmatter fields for GitHub Agentic Wor
- `cli-proxy:` - Mount each user-facing MCP server as a standalone CLI tool on `PATH` (boolean, default: `false`). When enabled, the agent can call MCP servers via shell commands (e.g. `github issue_read --method get ...`). CLI-mounted servers remain in the MCP gateway so their containers start normally.


- **`safe-outputs:`** - Safe output processing configuration. See [safe-outputs.md](safe-outputs.md) for complete documentation of all output types: `create-issue`, `create-discussion`, `add-comment`, `create-pull-request`, `push-to-pull-request-branch`, `close-issue`, `close-discussion`, `update-issue`, `update-pull-request`, `add-labels`, `remove-labels`, `dispatch-workflow`, `call-workflow`, `create-code-scanning-alert`, `upload-asset`, `upload-artifact`, `assign-to-agent`, `assign-to-user`, and more.
- **`safe-outputs:`** - Safe output processing configuration. See [safe-outputs.md](safe-outputs.md) for complete documentation of all output types: `create-issue`, `create-discussion`, `add-comment`, `create-pull-request`, `push-to-pull-request-branch`, `close-issue`, `close-discussion`, `update-issue`, `update-pull-request`, `add-labels`, `remove-labels`, `replace-label`, `dispatch-workflow`, `call-workflow`, `create-code-scanning-alert`, `upload-asset`, `upload-artifact`, `assign-to-agent`, `assign-to-user`, and more.

**Key safe-outputs global fields** (detail in [safe-outputs-runtime.md](safe-outputs-runtime.md)): `github-token`, `github-app`, `staged` (preview mode, no API calls), `footer`, `threat-detection`, `runs-on` (default `ubuntu-slim`), `messages`, `env`, `max-patch-size` (KB, default `4096`).

Expand Down
Loading