Skip to content

feat: support pull_request.labeled action for track_progress#1015

Open
0x-JP wants to merge 1 commit intoanthropics:mainfrom
0x-JP:feature/support-labeled-pr-action-with-track-progress
Open

feat: support pull_request.labeled action for track_progress#1015
0x-JP wants to merge 1 commit intoanthropics:mainfrom
0x-JP:feature/support-labeled-pr-action-with-track-progress

Conversation

@0x-JP
Copy link

@0x-JP 0x-JP commented Mar 5, 2026

Summary

  • Adds "labeled" to the supported PR actions in both detectMode() and validateTrackProgressEvent() in src/modes/detector.ts
  • Enables label-gated PR reviews with track_progress enabled
  • Adds test for pull_request.labeled with track_progress: true

Context

Fixes #418

Currently, using track_progress: "true" with pull_request: types: [labeled] throws:

track_progress for pull_request events is only supported for actions: opened, synchronize, ready_for_review, reopened. Current action: labeled

The downstream code (tag mode, prompt construction, branch setup, comment creation) is entirely action-agnostic for PR events, so the restriction was unnecessarily narrow. This change adds "labeled" to both validation arrays, enabling label-gated workflows like:

on:
  pull_request:
    types: [labeled]

jobs:
  review:
    if: github.event.label.name == 'my-review-label'
    steps:
      - uses: anthropics/claude-code-action@v1
        with:
          prompt: "Review this PR"
          track_progress: "true"

Test plan

  • Unit test added for pull_request.labeled with track_progress: true
  • All existing tests pass (bun test)
  • TypeScript typecheck passes (bun run typecheck)
  • Formatting passes (bun run format:check)

🤖 Generated with Claude Code

Add "labeled" to the supported PR actions in detectMode() and
validateTrackProgressEvent(), enabling label-gated PR reviews
with track_progress enabled.

Fixes anthropics#418

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Expand pull request action triggers for review mode

2 participants