mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-08-22 03:18:54 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user