overhaul git setup

This commit is contained in:
Colin McDonnell
2025-12-16 18:00:22 -08:00
parent f6ac916e22
commit 1bff21f7fb
19 changed files with 514 additions and 195 deletions
+6 -5
View File
@@ -7,12 +7,12 @@ export interface AgentInfo {
url: string;
}
export interface WorkflowRunInfo {
export interface WorkflowRunFooterInfo {
owner: string;
repo: string;
runId: string;
/** optional job URL - if provided, will be used instead of building from runId */
htmlUrl?: string;
/** optional job ID - if provided, will append /job/{jobId} to the workflow run URL */
jobId?: string | undefined;
}
export interface BuildPullfrogFooterParams {
@@ -21,7 +21,7 @@ export interface BuildPullfrogFooterParams {
/** add "Using [agent](url)" link */
agent?: AgentInfo | undefined;
/** add "View workflow run" link */
workflowRun?: WorkflowRunInfo | undefined;
workflowRun?: WorkflowRunFooterInfo | undefined;
/** arbitrary custom parts (e.g., action links) */
customParts?: string[];
}
@@ -42,7 +42,8 @@ export function buildPullfrogFooter(params: BuildPullfrogFooterParams): string {
}
if (params.workflowRun) {
const url = params.workflowRun.htmlUrl ?? `https://github.com/${params.workflowRun.owner}/${params.workflowRun.repo}/actions/runs/${params.workflowRun.runId}`;
const baseUrl = `https://github.com/${params.workflowRun.owner}/${params.workflowRun.repo}/actions/runs/${params.workflowRun.runId}`;
const url = params.workflowRun.jobId ? `${baseUrl}/job/${params.workflowRun.jobId}` : baseUrl;
parts.push(`[View workflow run](${url})`);
}