Request Format
Send a singlemetadata object.
Metadata Fields
| Parameter | Type | Description |
|---|---|---|
target_branch | Required | Branch name to reset (no refs/ prefix). |
target_commit_sha | Required | Commit SHA to reset the branch to. |
author | Required | Object with name and email. |
expected_head_sha | Optional | Guard to ensure the current tip matches before applying. |
commit_message | Optional | Commit message for the restore commit. |
committer | Optional | Object with name and email. |
JWT Requirements
- The JWT must include the repository in the
repoclaim - Requires
git:writescope
Response
Error Responses
| Status | Description |
|---|---|
400 Bad Request | Missing or invalid fields |
401 Unauthorized | Invalid JWT or missing authorization header |
403 Forbidden | Missing git:write scope |
404 Not Found | Repository or commit not found |
409 Conflict | Expected head SHA does not match |