Add agent PR labeling workflow#504
Open
AndreaGriffiths11 wants to merge 3 commits into
Open
Conversation
GitHub Advanced Security started work on behalf of
AndreaGriffiths11
June 8, 2026 22:57
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow to automatically apply a robot label to pull requests opened by bots/automated agents, helping maintainers quickly identify automated PRs.
Changes:
- Introduces a
label-agent-prsworkflow triggered on PR open/reopen events. - Ensures the
robotlabel exists (creating it if missing) and applies it to qualifying PRs.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/label-agent-prs.yml | Adds an Actions workflow to create (if needed) and apply a robot label to bot/agent PRs. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 2
Comment on lines
+3
to
+7
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - reopened |
Comment on lines
+27
to
+45
| try { | ||
| await github.rest.issues.getLabel({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| name: labelName, | ||
| }); | ||
| } catch (error) { | ||
| if (error.status === 404) { | ||
| await github.rest.issues.createLabel({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| name: labelName, | ||
| color: labelColor, | ||
| description: labelDescription, | ||
| }); | ||
| } else { | ||
| throw error; | ||
| } | ||
| } |
GitHub Advanced Security started work on behalf of
AndreaGriffiths11
June 8, 2026 23:00
View session
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
GitHub Advanced Security started work on behalf of
AndreaGriffiths11
June 9, 2026 00:19
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a GitHub Actions workflow to auto-label bot/agent-created pull requests with the robot label.