mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-01 18:43:24 +09:00
## Summary - Redesign the Actions run summary header to follow GitHub Actions layout: trigger info on the left, Status / Total duration / Artifacts columns inline on the right - Expose trigger user avatar, pull request link, and PR head branch info from the run view API - Update the workflow graph header to show the workflow filename (linked to the run workflow file) and `on: <event>`, while keeping the jobs/dependencies/success stats line - Remove the redundant commit/workflow metadata row below the run title; that information now lives in the summary bar New: <img width="1564" height="639" src="https://github.com/user-attachments/assets/e6bc1623-c5fc-4e97-abc9-fde7f3c6aef9" /> Old: <img width="2038" height="1038" src="https://github.com/user-attachments/assets/0857f19a-8d3a-4da2-82fd-e9ebeb200062" /> Replaces https://github.com/go-gitea/gitea/pull/36721 --------- Co-authored-by: Giteabot <teabot@gitea.io>
83 lines
1.8 KiB
TypeScript
83 lines
1.8 KiB
TypeScript
// see "models/actions/status.go", if it needs to be used somewhere else, move it to a shared file like "types/actions.ts"
|
|
export type ActionsStatus = 'unknown' | 'waiting' | 'running' | 'cancelling' | 'success' | 'failure' | 'cancelled' | 'skipped' | 'blocked';
|
|
export type ActionsArtifactStatus = 'expired' | 'completed';
|
|
|
|
export type ActionsRun = {
|
|
repoId: number,
|
|
link: string,
|
|
viewLink: string,
|
|
title: string,
|
|
titleHTML: string,
|
|
status: ActionsStatus,
|
|
canCancel: boolean,
|
|
canApprove: boolean,
|
|
canRerun: boolean,
|
|
canRerunFailed: boolean,
|
|
canDeleteArtifact: boolean,
|
|
done: boolean,
|
|
workflowID: string,
|
|
workflowLink: string,
|
|
isSchedule: boolean,
|
|
runAttempt: number,
|
|
attempts: Array<ActionsRunAttempt>,
|
|
duration: string,
|
|
triggeredAt: number,
|
|
triggerEvent: string,
|
|
pullRequest?: {
|
|
index: string,
|
|
link: string,
|
|
} | null,
|
|
jobs: Array<ActionsJob>,
|
|
commit: {
|
|
localeCommit: string,
|
|
localePushedBy: string,
|
|
shortSHA: string,
|
|
link: string,
|
|
pusher: {
|
|
displayName: string,
|
|
link: string,
|
|
avatarLink: string,
|
|
},
|
|
branch: {
|
|
name: string,
|
|
link: string,
|
|
isDeleted: boolean,
|
|
},
|
|
},
|
|
};
|
|
|
|
export type ActionsRunAttempt = {
|
|
attempt: number;
|
|
status: ActionsStatus;
|
|
done: boolean;
|
|
link: string;
|
|
current: boolean;
|
|
latest: boolean;
|
|
triggeredAt: number;
|
|
triggerUserName: string;
|
|
triggerUserLink: string;
|
|
triggerUserAvatar: string;
|
|
};
|
|
|
|
export type ActionsJob = {
|
|
id: number;
|
|
link: string;
|
|
jobId: string;
|
|
name: string;
|
|
status: ActionsStatus;
|
|
canRerun: boolean;
|
|
needs?: string[];
|
|
duration: string;
|
|
|
|
isReusableCaller: boolean;
|
|
parentJobID: number; // 0 for top-level jobs.
|
|
callUses?: string;
|
|
};
|
|
|
|
export type ActionsArtifact = {
|
|
name: string;
|
|
size: number;
|
|
status: ActionsArtifactStatus;
|
|
expiresUnix: number;
|
|
};
|