Skip to main content
Git notes allow you to attach metadata to commits without modifying the commit itself. Notes are stored in refs/notes/commits and are useful for storing build status, review comments, or other annotations.
const note = await repo.getNote({ sha: "abc123def456..." });
console.log(`Note for ${note.sha}: ${note.note}`);
console.log(`Notes ref SHA: ${note.refSha}`);

Options

sha
string
required
Commit SHA to read the note from
ttl
string
Token TTL. Token TTL in seconds.

Response

sha
string
The commit SHA
note
string
The note content
refSha
string
Current SHA of refs/notes/commits