create_commit_status
Set a commit's CI status in GitLab. Provide the project ID, commit SHA, and state (pending, running, success, failed, canceled, or skipped), with optional ref, coverage, target URL, or pipeline details.
Instructions
Create or update the status of a commit. Use this for a new resource or action; choose the corresponding update or edit tool when the resource already exists. It changes remote GitLab state and requires the necessary project or group permission; GitLab returns validation, conflict, permission, or rate-limit errors instead of silently applying an invalid request. When project_id or group_id is accepted, provide the numeric ID or complete URL-encoded path described by the schema; use required identifiers and pagination fields exactly as documented.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | The branch or tag ref | |
| sha | Yes | The commit hash to set the status on | |
| name | No | Status name. GitLab defaults to 'default' when omitted. | |
| state | Yes | Commit status state | |
| context | No | Alias for name. Provide either name or context, not both. | |
| coverage | No | Total code coverage for this status | |
| project_id | Yes | Project ID or complete URL-encoded path to project | |
| target_url | No | Target URL associated with this status | |
| description | No | Short status description | |
| pipeline_id | No | Pipeline ID to attach the status to |