Implement tea actions commands 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 runs
GET /repos/{owner}/{repo}/actions/runs/{run} - get specific run
GET /repos/{owner}/{repo}/actions/runs/{run}/jobs - list jobs for a run
GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs - download job logs
DELETE /repos/{owner}/{repo}/actions/runs/{run} - delete a run
## Summary
Implement `tea actions` commands 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](https://gitea.com/gitea/tea/pulls/838), [go-sdk#735](https://gitea.com/gitea/go-sdk/pulls/735), [gitea#35382](https://github.com/go-gitea/gitea/pull/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 runs
- `GET /repos/{owner}/{repo}/actions/runs/{run}` - get specific run
- `GET /repos/{owner}/{repo}/actions/runs/{run}/jobs` - list jobs for a run
- `GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs` - download job logs
- `DELETE /repos/{owner}/{repo}/actions/runs/{run}` - delete a run
## Commands to Implement
### `tea actions runs`
List workflow runs for a repository.
```bash
tea actions runs --repo owner/repo
tea actions runs --repo owner/repo --limit 10
```
### `tea actions jobs <run-id>`
List jobs for a specific run.
```bash
tea actions jobs 123 --repo owner/repo
```
### `tea actions logs <job-id>`
Display logs for a specific job.
```bash
tea actions logs 456 --repo owner/repo
```
## Implementation Plan
### 1. Explore existing codebase
- Study `cmd/repos/` for subcommand group patterns
- Study `cmd/issues/list.go` for list command patterns
- Study `modules/task/` for API client usage
### 2. Create command structure
```
cmd/actions/
├── actions.go # main "tea actions" command group
├── runs.go # "tea actions runs" - list runs
├── jobs.go # "tea actions jobs <run-id>" - list jobs
└── logs.go # "tea actions logs <job-id>" - show logs
```
### 3. Implement API calls
The go-sdk may not have Actions methods yet, so you may need to:
- Add direct HTTP calls using tea's existing client
- Or add methods to a local fork of go-sdk
### 4. Test locally
```bash
go build
./tea actions runs --repo flowmade-one/somerepo
./tea actions jobs 123 --repo flowmade-one/somerepo
./tea actions logs 456 --repo flowmade-one/somerepo
```
## References
- [Gitea API 1.25 docs](https://docs.gitea.com/api/1.25/)
- [Upstream tea PR #838](https://gitea.com/gitea/tea/pulls/838)
- [Upstream go-sdk PR #735](https://gitea.com/gitea/go-sdk/pulls/735)
- [Upstream gitea PR #35382](https://github.com/go-gitea/gitea/pull/35382)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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