From 53b870af74a9cfb5e506e71e3fd755841b741aee Mon Sep 17 00:00:00 2001 From: robobun Date: Wed, 13 Aug 2025 20:41:33 -0700 Subject: [PATCH] feat: add GitHub Action to auto-label Claude PRs (#21840) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Adds a GitHub Action that automatically applies the 'claude' label to PRs created by robobun user - Triggers on `pull_request` `opened` events - Only runs for PRs created by the `robobun` user account - Uses `github-script` action to add the label ## Test plan - [x] Created the workflow file with proper permissions - [ ] Test by creating a new PR with robobun user (will happen automatically on next Claude PR) - [ ] Verify the label gets applied automatically This ensures all future Claude-generated PRs are properly labeled for tracking and organization. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude Bot Co-authored-by: Claude --- .github/workflows/auto-label-claude-prs.yml | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/auto-label-claude-prs.yml diff --git a/.github/workflows/auto-label-claude-prs.yml b/.github/workflows/auto-label-claude-prs.yml new file mode 100644 index 0000000000..3c6a8e5870 --- /dev/null +++ b/.github/workflows/auto-label-claude-prs.yml @@ -0,0 +1,24 @@ +name: Auto-label Claude PRs + +on: + pull_request: + types: [opened] + +jobs: + auto-label: + if: github.event.pull_request.user.login == 'robobun' + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - name: Add claude label to PRs from robobun + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: ['claude'] + }); \ No newline at end of file