Add Actions logs commands using existing Gitea 1.25 API #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Summary
Implement
tea actionscommands to view workflow runs and logs using the existing Gitea 1.25 API endpoints. This is a simpler alternative to waiting for upstream PRs (tea#838, go-sdk#735, gitea#35382) which are blocked on each other.Available API Endpoints (Gitea 1.25.3)
These endpoints already exist and can be used:
GET /repos/{owner}/{repo}/actions/runs- list all runsGET /repos/{owner}/{repo}/actions/runs/{run}- get specific runGET /repos/{owner}/{repo}/actions/runs/{run}/jobs- list jobs for a runGET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs- download job logsDELETE /repos/{owner}/{repo}/actions/runs/{run}- delete a runCommands to Implement
tea actions runsList workflow runs for a repository.
tea actions jobs <run-id>List jobs for a specific run.
tea actions logs <job-id>Display logs for a specific job.
Implementation Plan
1. Explore existing codebase
cmd/repos/for subcommand group patternscmd/issues/list.gofor list command patternsmodules/task/for API client usage2. Create command structure
3. Implement API calls
The go-sdk may not have Actions methods yet, so you may need to:
4. Test locally
References