mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-14 18:44:06 +00:00
Action runs, jobs and steps have 8 statuses but the UI only showed 5
(from the commit status api) for the latter two. Align all 8 to GitHub
as closely as possible:
- waiting — `octicon-circle` (hollow circle), gray
- blocked — `octicon-blocked` (slashed circle), yellow
- running — `gitea-running` (rotating spinner), yellow
- cancelled — `octicon-stop` (gray), was `octicon-x` (red)
Descriptions also aligned with GitHub:
- "Has started running" → "In progress"
- "Has been cancelled" → "Cancelled after {dur}"
- "Has been skipped" → "Skipped"
Fixes: https://github.com/go-gitea/gitea/issues/32228
---------
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Nicolas <bircni@icloud.com>
73 lines
1.6 KiB
TypeScript
73 lines
1.6 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' | '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,
|
|
jobs: Array<ActionsJob>,
|
|
commit: {
|
|
localeCommit: string,
|
|
localePushedBy: string,
|
|
shortSHA: string,
|
|
link: string,
|
|
pusher: {
|
|
displayName: string,
|
|
link: 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;
|
|
};
|
|
|
|
export type ActionsJob = {
|
|
id: number;
|
|
link: string;
|
|
jobId: string;
|
|
name: string;
|
|
status: ActionsStatus;
|
|
canRerun: boolean;
|
|
needs?: string[];
|
|
duration: string;
|
|
};
|
|
|
|
export type ActionsArtifact = {
|
|
name: string;
|
|
size: number;
|
|
status: ActionsArtifactStatus;
|
|
expiresUnix: number;
|
|
};
|