secana/ForgejoKit
3
11
Fork
You've already forked ForgejoKit
3

feat: add Forgejo Actions runs API #1

Merged
secana merged 1 commit from voyo/ForgejoKit:feat/actions-support into main 2026年05月07日 16:42:17 +02:00
Contributor
Copy link

New model:

  • WorkflowRun — mirrors Forgejo's ActionRun schema (id, title, status,
    event, indexInRepo, commitSha, prettyRef, workflowId, created, updated,
    started, stopped, durationNanos, htmlUrl, triggerUser, repository).

New service:

  • WorkflowService
    • fetchRuns(owner:repo:status:event:ref:workflowId:runNumber:headSha:page:limit:)
      backed by GET /repos/{owner}/{repo}/actions/runs.
    • fetchRun(owner:repo:runId:) backed by
      GET /repos/{owner}/{repo}/actions/runs/{run_id}.

Experimental:

  • fetchRunView(owner:repo:runIndex:jobIndex:logCursors:) backed by
    Forgejo's web-UI route POST
    /{owner}/{repo}/actions/runs/{runIndex}/jobs/{jobIndex}/attempt/{N}.
    This is not part of /api/v1 and may change between Forgejo releases;
    it lets clients render jobs, steps, and step logs (via WorkflowRunView,
    WorkflowRunViewJob, WorkflowRunViewStep, WorkflowLogCursor types).
  • ForgejoClient.discoverRedirectLocation(url:) helper that resolves
    Forgejo's RedirectToLatestAttempt without consuming the redirect
    target — used to find the latest attempt number before POSTing.
New model: - WorkflowRun — mirrors Forgejo's ActionRun schema (id, title, status, event, indexInRepo, commitSha, prettyRef, workflowId, created, updated, started, stopped, durationNanos, htmlUrl, triggerUser, repository). New service: - WorkflowService - fetchRuns(owner:repo:status:event:ref:workflowId:runNumber:headSha:page:limit:) backed by GET /repos/{owner}/{repo}/actions/runs. - fetchRun(owner:repo:runId:) backed by GET /repos/{owner}/{repo}/actions/runs/{run_id}. Experimental: - fetchRunView(owner:repo:runIndex:jobIndex:logCursors:) backed by Forgejo's web-UI route POST /{owner}/{repo}/actions/runs/{runIndex}/jobs/{jobIndex}/attempt/{N}. This is not part of /api/v1 and may change between Forgejo releases; it lets clients render jobs, steps, and step logs (via WorkflowRunView, WorkflowRunViewJob, WorkflowRunViewStep, WorkflowLogCursor types). - ForgejoClient.discoverRedirectLocation(url:) helper that resolves Forgejo's RedirectToLatestAttempt without consuming the redirect target — used to find the latest attempt number before POSTing.
New model:
 - WorkflowRun — mirrors Forgejo's ActionRun schema (id, title, status,
 event, indexInRepo, commitSha, prettyRef, workflowId, created, updated,
 started, stopped, durationNanos, htmlUrl, triggerUser, repository).
New service:
 - WorkflowService
 - fetchRuns(owner:repo:status:event:ref:workflowId:runNumber:headSha:page:limit:)
 backed by GET /repos/{owner}/{repo}/actions/runs.
 - fetchRun(owner:repo:runId:) backed by
 GET /repos/{owner}/{repo}/actions/runs/{run_id}.
Experimental:
 - fetchRunView(owner:repo:runIndex:jobIndex:logCursors:) backed by
 Forgejo's web-UI route POST
 /{owner}/{repo}/actions/runs/{runIndex}/jobs/{jobIndex}/attempt/{N}.
 This is not part of /api/v1 and may change between Forgejo releases;
 it lets clients render jobs, steps, and step logs (via WorkflowRunView,
 WorkflowRunViewJob, WorkflowRunViewStep, WorkflowLogCursor types).
 - ForgejoClient.discoverRedirectLocation(url:) helper that resolves
 Forgejo's RedirectToLatestAttempt without consuming the redirect
 target — used to find the latest attempt number before POSTing.
secana left a comment
Copy link

Thanks a lot for the great PR

Thanks a lot for the great PR
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
secana/ForgejoKit!1
Reference in a new issue
secana/ForgejoKit
No description provided.
Delete branch "voyo/ForgejoKit:feat/actions-support"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?