Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Actions API endpoints for workflow run and job management #35382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rossigee wants to merge 1 commit into go-gitea:main
base: main
Choose a base branch
Loading
from rossigee:feature/runner-logs-api-endpoint

Conversation

Copy link

@rossigee rossigee commented Aug 29, 2025

Implements comprehensive REST API endpoints for GitHub Actions workflow runs:

  • POST /actions/runs/{run}/rerun - Rerun entire workflow run
  • POST /actions/runs/{run}/cancel - Cancel running workflow
  • POST /actions/runs/{run}/approve - Approve workflow requiring approval
  • POST /actions/runs/{run}/jobs/{job_id}/rerun - Rerun specific job
  • GET /actions/runs/{run}/logs - Download run logs archive
  • GET /actions/runs/{run}/jobs/{job_id}/logs - Download job logs
  • POST /actions/runs/{run}/logs - Stream logs with cursor support

Features:

  • Proper permission checks and workflow validation
  • Support for "latest" run parameter
  • Job dependency handling for reruns
  • Streaming log API with cursor-based pagination
  • Comprehensive test coverage

Fixes workflow management gaps in API compatibility.

inxcts reacted with thumbs up emoji
Implements comprehensive REST API endpoints for GitHub Actions workflow runs:
- POST /actions/runs/{run}/rerun - Rerun entire workflow run
- POST /actions/runs/{run}/cancel - Cancel running workflow
- POST /actions/runs/{run}/approve - Approve workflow requiring approval
- POST /actions/runs/{run}/jobs/{job_id}/rerun - Rerun specific job
- GET /actions/runs/{run}/logs - Download run logs archive
- GET /actions/runs/{run}/jobs/{job_id}/logs - Download job logs
- POST /actions/runs/{run}/logs - Stream logs with cursor support
Features:
- Proper permission checks and workflow validation
- Support for "latest" run parameter
- Job dependency handling for reruns
- Streaming log API with cursor-based pagination
- Comprehensive test coverage
Fixes workflow management gaps in API compatibility.
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 29, 2025
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels Aug 29, 2025
Copy link
Author

Addresses #35176

Copy link
Contributor

Please be aware existing Gitea workflow api do not use runindex, {run} is expected to be the run id.

also jobs use jobid instead of jobindex.


GET /actions/runs/{run}/jobs/{job_id}/logs - Download job logs
is already implemented

m.Get("/{job_id}/logs", repo.DownloadActionsRunJobLogs)
denyskon reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /