Skip to content

track_progress should support labeled action for pull_request events #1585

Description

@takakisatojp

Summary

track_progress currently supports the labeled action for issues events, but not for pull_request events. This asymmetry makes it impossible to use track_progress when triggering a review via a label added to a pull request (as opposed to an issue).

Environment

  • Action: anthropics/claude-code-action@v1
  • Trigger: pull_request (types: [labeled])

Where this is documented

In action.yml:

track_progress:
  description: "Force tag mode with tracking comments for pull_request and issue events.
  Only applicable to pull_request (opened, synchronize, ready_for_review, reopened)
  and issue (opened, edited, labeled, assigned) events."

Note that issue events list labeled as a supported action, but pull_request events do not.

Where this is enforced

In src/modes/detector.ts, validateTrackProgressEvent():

if (context.eventName === "pull_request" && context.eventAction) {
  const validActions = [
    "opened",
    "synchronize",
    "ready_for_review",
    "reopened",
  ];
  if (!validActions.includes(context.eventAction)) {
    throw new Error(
      `track_progress for pull_request events is only supported for actions: ` +
        `${validActions.join(", ")}. Current action: ${context.eventAction}`,
    );
  }
}

Reproduction

  1. Configure a workflow with on: pull_request: types: [labeled].
  2. Trigger the action with track_progress: true when a specific label (e.g. claude-review) is added to a PR.
  3. The action fails immediately with:
Error: track_progress for pull_request events is only supported for actions: opened, synchronize, ready_for_review, reopened. Current action: labeled

Why this matters

A common automation pattern is "add a label to a PR to trigger a Claude review" (mirroring the same pattern that's already supported for issues). Since track_progress is disallowed for this case, users must disable progress tracking entirely just to support label-triggered PR reviews, even though the same feature works fine for label-triggered issue automation.

Suggested fix

Add "labeled" to the validActions list for pull_request events in validateTrackProgressEvent() (and update the corresponding action.yml description), consistent with how issue events already support labeled.

Workaround currently in use

We conditionally disable track_progress only for pull_request events:

track_progress: ${{ github.event_name != 'pull_request' }}

This works, but means PR reviews triggered by label no longer get progress-tracking comments, unlike other trigger paths (e.g. @claude mentions via comments).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions