fix: support labeled action for pull_request events in track_progress (#1586)

Adds "labeled" to the valid pull_request actions for track_progress,
mirroring the existing support for issue events. Previously, adding
a label to a PR (e.g. to trigger a label-driven Claude review) would
fail validation even though the same pattern works for issues.

Fixes #1585
This commit is contained in:
Takaki Sato
2026-08-07 07:55:20 -07:00
committed by GitHub
parent 0a5f191964
commit d573b167d3
3 changed files with 16 additions and 1 deletions
+14
View File
@@ -76,6 +76,20 @@ describe("detectMode with enhanced routing", () => {
expect(detectMode(context)).toBe("agent");
});
it("should use tag mode when track_progress is true for pull_request.labeled", () => {
const context: GitHubContext = {
...baseContext,
eventName: "pull_request",
eventAction: "labeled",
payload: { pull_request: { number: 1 } } as any,
entityNumber: 1,
isPR: true,
inputs: { ...baseContext.inputs, trackProgress: true },
};
expect(detectMode(context)).toBe("tag");
});
it("should throw error when track_progress is used with unsupported PR action", () => {
const context: GitHubContext = {
...baseContext,