feat: implement commit statuses (CI integration) #3

Open
opened 2026-06-02 06:56:53 +00:00 by a-limasov · 0 comments
Owner

Context

Commit statuses are how CI/CD systems (Gitea Actions, Jenkins, etc.) report build results
back to a commit. Reading and writing statuses is required to integrate external pipelines
and to display CI state in PR workflows.

Endpoints to implement

Method Path Tool name Description
GET /repos/{owner}/{repo}/statuses/{sha} list_commit_statuses List statuses for a commit
POST /repos/{owner}/{repo}/statuses/{sha} create_commit_status Create/update a status
GET /repos/{owner}/{repo}/commits/{sha}/status get_combined_commit_status Get combined (aggregate) status

Acceptance Criteria

  • list_commit_statuses(owner, repo, sha, limit, page) returns paginated list of statuses
  • create_commit_status(owner, repo, sha, state, context, description, target_url) creates status
  • state validated as one of: pending | success | error | failure | warning
  • get_combined_commit_status(owner, repo, sha) returns aggregate state + list of statuses
  • sha accepts full commit hash, branch name, or tag name

Technical Notes

  • POST /statuses/{sha} body: {"state": "success", "context": "ci/build", "description": "Build passed", "target_url": "https://..."}
  • context is the name of the status check (e.g. "ci/build", "security/scan")
  • Combined status endpoint aggregates multiple contexts into a single state
  • sha in the URL for list_commit_statuses is /statuses/{sha} not /commits/{sha}/statuses — verify against spec
## Context Commit statuses are how CI/CD systems (Gitea Actions, Jenkins, etc.) report build results back to a commit. Reading and writing statuses is required to integrate external pipelines and to display CI state in PR workflows. ## Endpoints to implement | Method | Path | Tool name | Description | |--------|------|-----------|-------------| | GET | `/repos/{owner}/{repo}/statuses/{sha}` | `list_commit_statuses` | List statuses for a commit | | POST | `/repos/{owner}/{repo}/statuses/{sha}` | `create_commit_status` | Create/update a status | | GET | `/repos/{owner}/{repo}/commits/{sha}/status` | `get_combined_commit_status` | Get combined (aggregate) status | ## Acceptance Criteria - [ ] `list_commit_statuses(owner, repo, sha, limit, page)` returns paginated list of statuses - [ ] `create_commit_status(owner, repo, sha, state, context, description, target_url)` creates status - [ ] `state` validated as one of: `pending` | `success` | `error` | `failure` | `warning` - [ ] `get_combined_commit_status(owner, repo, sha)` returns aggregate state + list of statuses - [ ] `sha` accepts full commit hash, branch name, or tag name ## Technical Notes - `POST /statuses/{sha}` body: `{"state": "success", "context": "ci/build", "description": "Build passed", "target_url": "https://..."}` - `context` is the name of the status check (e.g. `"ci/build"`, `"security/scan"`) - Combined status endpoint aggregates multiple contexts into a single state - `sha` in the URL for `list_commit_statuses` is `/statuses/{sha}` not `/commits/{sha}/statuses` — verify against spec
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: a-limasov/gitea-platform-mcp#3