feat(actions): add job summaries (GITHUB_STEP_SUMMARY)#37500
feat(actions): add job summaries (GITHUB_STEP_SUMMARY)#37500bircni wants to merge 2 commits intogo-gitea:mainfrom
Conversation
431a134 to
3e295ba
Compare
There was a problem hiding this comment.
Pull request overview
Adds GitHub-style Actions job summaries support by introducing a runner upload endpoint backed by a new DB table, then rendering uploaded summaries on the run “Summary” view in the web UI.
Changes:
- Add
ActionRunJobSummarymodel + migration, and expose job summaries in the Actions run view JSON. - Add runner-facing upload endpoint (
PUT .../workflows/{run_id}/jobs/{job_id}/summary) and advertise capability viaX-Gitea-Actions-Capabilities. - Render job summaries in the run Summary UI (plus devtest mock data) and extend integration coverage for the view response.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| web_src/js/modules/gitea-actions.ts | Adds ActionsJobSummary type and jobSummaries field on ActionsRun. |
| web_src/js/components/RepoActionView.vue | Adds a right-side “Job summaries” panel rendered via v-html; refactors right panel layout/styles. |
| web_src/js/components/ActionRunView.ts | Initializes jobSummaries in the empty run state. |
| web_src/js/components/ActionRunSummaryView.vue | Minor template/style whitespace adjustment. |
| tests/integration/actions_route_test.go | Asserts job summaries are included in the run view response and contain rendered HTML. |
| routers/web/repo/actions/view.go | Adds jobSummaries to the view response and renders stored content to HTML. |
| routers/web/devtest/mock_actions.go | Adds mocked job summaries to devtest run view for UI preview. |
| routers/api/actions/runner/runner.go | Adds capability negotiation header in RunnerService.Declare. |
| routers/api/actions/job_summary.go | Implements job summary upload handler and (currently unused) router constructor. |
| routers/api/actions/artifacts.go | Mounts the job summary upload endpoint under the Actions pipeline API prefix. |
| models/migrations/v1_27/v332.go | Adds migration to create action_run_job_summary table. |
| models/migrations/migrations.go | Registers migration ID 332. |
| models/actions/run_job_summary.go | Implements model definition + get/upsert/list helpers and size limit constant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
One major architectural concern: On GitHub, GITHUB_STEP_SUMMARY is per-step but this implementation is per-job. GitHub collects all summaries from all steps and then combines them into one big job summary. Imho this must be fixed, as future fixes would require DB migrations. Will post Claude's review below. |
Smaller: Reviewed with Claude Opus 4.7. |
GITHUB_STEP_SUMMARY/workflow/SUMMARY.md) and render them on the run Summary view.PUT /api/actions_pipeline/_apis/pipelines/workflows/{run_id}/jobs/{job_id}/summaryRunnerService.Declareresponse header:X-Gitea-Actions-Capabilities: job-summary/devtest/repo-action-view/...to include mockjobSummariesfor previewing UI rendering.Compatibility
Fixes #23721
PR on gitea-runner https://gitea.com/gitea/runner/pulls/917