refs/notes/commits by default. Pass ref to create the note on another notes ref.
createNote() creates a new note and fails if the target already has a note on the selected notes
ref. To replace a note, call deleteNote() first, then create the new note.
See Git Notes for notes ref rules and write behavior.
Options
string
required
Commit SHA to attach the note to
string
required
Note content
string
Notes ref to create the note on. Accepts short names like
ci, notes/ci, or full refs like
refs/notes/ci; all are normalized to a full refs/notes/* ref. Defaults to
refs/notes/commits. Go: Ref.string
Author signature (
name and email)string
Expected SHA of the target notes ref for optimistic concurrency control
string
Token TTL. Token TTL in seconds.
object[]
Ordered per-ref policy rules (
{ pattern, ops? }) embedded in the per-call JWT. Evaluated against the target notes ref. Python: ref_policies. Go: RefPolicies with type storage.RefPolicyList. See the Branch Protection guide.Response
string
The commit SHA the note is attached to
string
The canonical notes ref that was updated
string
Previous notes ref commit SHA
string
New notes ref SHA after the operation
object
Operation result with
success, status, and optional message