Files
admin e4afba3416
giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
cache-seeder / gobuild (push) Canceled after 0s
cache-seeder / lint (bindata, lint-backend) (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s
chore: initialize Gitea v1.27.2 fork
Includes direct password setup links in registration emails.

Assisted-by: Codex:GPT-5
2026-08-15 22:56:18 +08:00

92 lines
2.0 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,
index: 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,
canViewWorkflowFile: boolean,
isSchedule: boolean,
runAttempt: number,
attempts: Array<ActionsRunAttempt>,
duration: string,
triggeredAt: number,
triggerEvent: string,
pullRequest?: {
index: string,
link: string,
} | null,
jobs: Array<ActionsJob>,
jobSummaries?: Array<ActionsJobSummary>,
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 ActionsJobSummary = {
jobId: number,
jobName: string,
summaryHTML: string,
};
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;
};