1
0
Fork 0
mirror of https://gitea.com/gitea/tea.git synced 2026-02-22 19:35:23 +01:00
tea/modules/print
yousfi saad 2152d99f2d Add tea actions runs and workflows commands (#880)
Implements comprehensive workflow execution tracking for Gitea Actions using tea CLI

## Features

### tea actions runs list
- List workflow runs with filtering (status, branch, event, actor, time)
- Time filters: relative (24h, 7d) and absolute dates
- Status symbols: ✓ success, ✘ failure, ⭮ pending, ⊘ skipped/cancelled, ⚠ blocked
- Multiple output formats: table, json, yaml, csv, tsv

### tea actions runs view
- View run details with metadata (ID, status, workflow, branch, event, trigger info)
- Shows jobs table with status, runner, duration
- Optional --jobs flag to toggle jobs display

### tea actions runs delete
- Delete/cancel workflow runs with confirmation prompt
- Supports --confirm/-y to skip prompt

### tea actions runs logs
- View job logs for all jobs or specific job (--job <id>)
- **New: --follow/-f flag for real-time log following** (like tail -f)
- Polls API every 2 seconds, only shows new content
- Auto-detects completion and exits

### tea actions workflows list
- List workflow files (.yml and .yaml) in repository
- Searches in .gitea/workflows and .github/workflows
- Shows active (✓) or inactive (✗) status based on recent runs
- Displays workflow name, path, and file size

## Commands

`tea actions runs list --status success --since 24h`
`tea actions runs view 123`
`tea actions runs delete 123 --confirm`
`tea actions runs logs 123 --job 456 --follow`
`tea actions workflows list`

## Tests
- 19 unit tests across all commands
- Full test suite passing
- Manual testing successful

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Reviewed-on: https://gitea.com/gitea/tea/pulls/880
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: yousfi saad <yousfi.saad@gmail.com>
Co-committed-by: yousfi saad <yousfi.saad@gmail.com>
2026-02-11 00:40:06 +00:00
..
actions.go feat: add actions management commands (#796) 2025-10-19 02:53:17 +00:00
actions_runs.go Add tea actions runs and workflows commands (#880) 2026-02-11 00:40:06 +00:00
actions_runs_test.go Add tea actions runs and workflows commands (#880) 2026-02-11 00:40:06 +00:00
actions_test.go feat: add actions management commands (#796) 2025-10-19 02:53:17 +00:00
attachment.go Fix attachment size (#787) 2025-08-11 18:45:12 +00:00
branch.go tea branches list/protect/unprotect (#645) 2024-07-26 16:02:07 +00:00
comment.go spdx (#581) 2023-09-08 01:40:02 +00:00
formatters.go Fix attachment size (#787) 2025-08-11 18:45:12 +00:00
issue.go spdx (#581) 2023-09-08 01:40:02 +00:00
label.go spdx (#581) 2023-09-08 01:40:02 +00:00
login.go spdx (#581) 2023-09-08 01:40:02 +00:00
markdown.go Upgrade dependencies (#849) 2025-11-24 19:21:55 +00:00
milestone.go Use bubbletea instead of survey for interacting with TUI (#786) 2025-08-11 18:23:52 +00:00
notification.go Code Cleanup (#869) 2026-02-02 22:39:26 +00:00
organization.go spdx (#581) 2023-09-08 01:40:02 +00:00
pull.go Code Cleanup (#869) 2026-02-02 22:39:26 +00:00
release.go Add Zip URL for release list (#788) 2025-08-11 18:43:34 +00:00
repo.go spdx (#581) 2023-09-08 01:40:02 +00:00
table.go Fix yaml output single quote (#814) 2025-09-14 00:23:12 +00:00
table_test.go Fix yaml output single quote (#814) 2025-09-14 00:23:12 +00:00
times.go Code Cleanup (#869) 2026-02-02 22:39:26 +00:00
user.go Code Cleanup (#869) 2026-02-02 22:39:26 +00:00
webhook.go feat: add repository webhook management (#798) 2025-10-19 03:40:23 +00:00
webhook_test.go feat: add repository webhook management (#798) 2025-10-19 03:40:23 +00:00