Request Body
| Parameter | Type | Description |
|---|---|---|
sha | Required | Commit SHA to attach the note to |
action | Required | Set to "append" to append to an existing note |
note | Required | The note content to append |
author | Optional | Object with name and email for the notes commit |
expected_ref_sha | Optional | Expected notes ref SHA for optimistic concurrency control |
JWT Requirements
- The JWT must include the repository in the
repoclaim - Requires
git:writescope
Response
Response Fields
| Field | Type | Description |
|---|---|---|
sha | String | The commit SHA the note is attached to |
target_ref | String | The notes reference (refs/notes/commits) |
base_commit | Optional | Previous notes ref commit SHA |
new_ref_sha | String | New notes ref SHA after the operation |
result | Object | Operation result with success, status, and optional message |
Notes
- Use
action: "append"to add content to an existing note - If no note exists, one will be created
- Useful for accumulating multiple annotations on the same commit (e.g., multiple CI results)
Error Responses
| Status | Description |
|---|---|
409 Conflict | expected_ref_sha doesn’t match current notes ref |
401 Unauthorized | Invalid JWT or missing git:write scope |
400 Bad Request | Missing required fields |