mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
This reverts commit cefe963a6b.
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import { describe, it, expect } from "bun:test";
|
||||
import {
|
||||
updateCommentBody,
|
||||
type CommentUpdateInput,
|
||||
} from "../src/github/operations/comment-logic";
|
||||
import { updateCommentBody } from "../src/github/operations/comment-logic";
|
||||
|
||||
describe("updateCommentBody", () => {
|
||||
const baseInput = {
|
||||
@@ -420,27 +417,5 @@ describe("updateCommentBody", () => {
|
||||
"• [Create PR ➔](https://github.com/owner/repo/compare/main...claude/issue-123-20240101-1200)",
|
||||
);
|
||||
});
|
||||
|
||||
it("should not show branch name when branch doesn't exist remotely", () => {
|
||||
const input: CommentUpdateInput = {
|
||||
currentBody: "@claude can you help with this?",
|
||||
actionFailed: false,
|
||||
executionDetails: { duration_ms: 90000 },
|
||||
jobUrl: "https://github.com/owner/repo/actions/runs/123",
|
||||
branchLink: "", // Empty branch link means branch doesn't exist remotely
|
||||
branchName: undefined, // Should be undefined when branchLink is empty
|
||||
triggerUsername: "claude",
|
||||
prLink: "",
|
||||
};
|
||||
|
||||
const result = updateCommentBody(input);
|
||||
|
||||
expect(result).toContain("Claude finished @claude's task in 1m 30s");
|
||||
expect(result).toContain(
|
||||
"[View job](https://github.com/owner/repo/actions/runs/123)",
|
||||
);
|
||||
expect(result).not.toContain("claude/issue-123");
|
||||
expect(result).not.toContain("tree/claude/issue-123");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user