feat(gitea): add domain model classes, helpers, and refactor GiteaClient internals; expand README with usage and docs
This commit is contained in:
@@ -18,7 +18,7 @@ export interface IListOptions {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export interface IActionRunListOptions extends IListOptions {
|
||||
/** Filter by run status (waiting, running, success, failure, cancelled) */
|
||||
/** Filter by run status. Accepts normalized names (running, failed, etc.) — auto-translated to Gitea API values. */
|
||||
status?: string;
|
||||
/** Filter by head branch */
|
||||
branch?: string;
|
||||
@@ -35,13 +35,15 @@ export interface IActionRunListOptions extends IListOptions {
|
||||
export interface IGiteaUser {
|
||||
id: number;
|
||||
login: string;
|
||||
login_name: string;
|
||||
source_id: number;
|
||||
full_name: string;
|
||||
email: string;
|
||||
avatar_url: string;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Repositories
|
||||
// Repositories (raw API response)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export interface IGiteaRepository {
|
||||
@@ -62,7 +64,7 @@ export interface IGiteaRepository {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Organizations
|
||||
// Organizations (raw API response)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export interface IGiteaOrganization {
|
||||
@@ -72,6 +74,7 @@ export interface IGiteaOrganization {
|
||||
description: string;
|
||||
visibility: string;
|
||||
repo_count: number;
|
||||
avatar_url: string;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -84,25 +87,25 @@ export interface IGiteaSecret {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Action Runs
|
||||
// Action Runs (raw API response — aligned with Gitea 1.25 swagger)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export interface IGiteaActionRun {
|
||||
id: number;
|
||||
name: string;
|
||||
workflow_id: string;
|
||||
status: string;
|
||||
conclusion: string;
|
||||
status: string; // run state: running, waiting, completed
|
||||
conclusion: string; // result: success, failure, cancelled, skipped
|
||||
head_branch: string;
|
||||
head_sha: string;
|
||||
html_url: string;
|
||||
event: string;
|
||||
path: string; // e.g. "workflow.yaml@refs/tags/v1.0"
|
||||
display_title: string;
|
||||
run_number: number;
|
||||
run_attempt: number;
|
||||
run_duration: number;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
started_at: string;
|
||||
completed_at: string;
|
||||
actor: IGiteaUser;
|
||||
trigger_actor: IGiteaUser;
|
||||
repository: {
|
||||
@@ -111,15 +114,10 @@ export interface IGiteaActionRun {
|
||||
full_name: string;
|
||||
html_url: string;
|
||||
};
|
||||
head_commit: {
|
||||
id: string;
|
||||
message: string;
|
||||
timestamp: string;
|
||||
};
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Action Run Jobs
|
||||
// Action Run Jobs (raw API response)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export interface IGiteaActionRunJob {
|
||||
@@ -132,7 +130,6 @@ export interface IGiteaActionRunJob {
|
||||
status: string;
|
||||
conclusion: string;
|
||||
html_url: string;
|
||||
run_duration: number;
|
||||
started_at: string;
|
||||
completed_at: string;
|
||||
steps: IGiteaActionRunJobStep[];
|
||||
|
||||
Reference in New Issue
Block a user