mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 15:04:13 +08:00
34 lines
929 B
TypeScript
34 lines
929 B
TypeScript
import { GITHUB_SERVER_URL } from "../../api/config";
|
|
|
|
export const SPINNER_HTML =
|
|
'<img src="https://github.com/user-attachments/assets/5ac382c7-e004-429b-8e35-7feb3e8f9c6f" width="14px" height="14px" style="vertical-align: middle; margin-left: 4px;" />';
|
|
|
|
export function createJobRunLink(
|
|
owner: string,
|
|
repo: string,
|
|
runId: string,
|
|
): string {
|
|
const jobRunUrl = `${GITHUB_SERVER_URL}/${owner}/${repo}/actions/runs/${runId}`;
|
|
return `[View job run](${jobRunUrl})`;
|
|
}
|
|
|
|
export function createBranchLink(
|
|
owner: string,
|
|
repo: string,
|
|
branchName: string,
|
|
): string {
|
|
const branchUrl = `${GITHUB_SERVER_URL}/${owner}/${repo}/tree/${branchName}`;
|
|
return `\n[View branch](${branchUrl})`;
|
|
}
|
|
|
|
export function createCommentBody(
|
|
jobRunLink: string,
|
|
branchLink: string = "",
|
|
): string {
|
|
return `Claude Code is working… ${SPINNER_HTML}
|
|
|
|
I'll analyze this and get back to you.
|
|
|
|
${jobRunLink}${branchLink}`;
|
|
}
|