Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 21, 2026

Adds a remove-labels safe output that allows agentic workflows to remove labels from issues and pull requests. This complements the existing add-labels safe output.

Changes

  • Go implementation (pkg/workflow/remove_labels.go): Config struct and parsing logic following add-labels pattern
  • JavaScript handler (actions/setup/js/remove_labels.cjs): Processes remove_labels messages, gracefully skips labels not present on the item
  • Schema updates: Added to main_workflow_schema.json and safe_outputs_tools.json
  • Wiring: Updated config generation, handler registration, permissions, imports merging, and TypeScript types

Usage

safe-outputs:
  remove-labels:
    allowed:
      - needs-triage
      - bug
    max: 5
    target: triggering  # or "*" or explicit number

Supports same options as add-labels: max, allowed, target, target-repo, github-token.

Original prompt

Do we have a remove-label safe output? Please first check whether something like this already exists (doesn't have to have that specific name, just looking for a safe output that removes a label from an issue or PR). If it doesn't please implement it.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 21, 2026 00:17
Co-authored-by: eaftan <4733401+eaftan@users.noreply.github.com>
Co-authored-by: eaftan <4733401+eaftan@users.noreply.github.com>
Co-authored-by: eaftan <4733401+eaftan@users.noreply.github.com>
Copilot AI changed the title [WIP] Check for existing remove label functionality Add remove-labels safe output Jan 21, 2026
Copilot AI requested a review from eaftan January 21, 2026 00:46
@eaftan
Copy link
Contributor

eaftan commented Jan 21, 2026

@eaftan eaftan marked this pull request as ready for review January 21, 2026 00:51
@eaftan eaftan requested review from pelikhan and removed request for eaftan January 21, 2026 00:52
@pelikhan
Copy link
Contributor

@copilot

  • update smoke copilot to remove the "smoke" label from the current pull request
  • ensure this feature works for issues/discussions/pull requests

@pelikhan
Copy link
Contributor

https://gh.io/copilot-coding-agent-docs

update smoke copilot to remove the "smoke" label from the current pull request
ensure this feature works for issues/discussions/pull requests

@pelikhan
Copy link
Contributor

@copilot update smoke copilot to remove the "smoke" label from the current pull request
ensure this feature works for issues/discussions/pull requests

@pelikhan
Copy link
Contributor

@copilot update smoke copilot to remove the "smoke" label from the current pull request
ensure this feature works for issues/discussions/pull requests

@pelikhan
Copy link
Contributor

@copilot update smoke copilot to remove the "smoke" label from the current pull request
ensure this feature works for issues/discussions/pull requests

@pelikhan
Copy link
Contributor

@copilot merge main, format, lint

@pelikhan
Copy link
Contributor

@copilot merge main, format, lint

@pelikhan
Copy link
Contributor

@copilot update smoke copilot to remove the "smoke" label from the current pull request
ensure this feature works for issues/discussions/pull requests

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants