Files
gitea/web_src/js/modules/gitea-actions.ts
Nicolas 16bdae53c8 Workflow Artifact Info Hover (#37100)
Add expiry metadata to action artifacts in the run view and show it on hover.

---------

Signed-off-by: Nicolas <bircni@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-19 07:37:50 +00:00

57 lines
1.3 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 ActionsRunStatus = 'unknown' | 'waiting' | 'running' | 'success' | 'failure' | 'cancelled' | 'skipped' | 'blocked';
export type ActionsArtifactStatus = 'expired' | 'completed';
export type ActionsRun = {
repoId: number,
link: string,
title: string,
titleHTML: string,
status: ActionsRunStatus,
canCancel: boolean,
canApprove: boolean,
canRerun: boolean,
canRerunFailed: boolean,
canDeleteArtifact: boolean,
done: boolean,
workflowID: string,
workflowLink: string,
isSchedule: boolean,
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 ActionsJob = {
id: number;
jobId: string;
name: string;
status: ActionsRunStatus;
canRerun: boolean;
needs?: string[];
duration: string;
};
export type ActionsArtifact = {
name: string;
size: number;
status: ActionsArtifactStatus;
expiresUnix: number;
};