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

ParameterTypeDescription
shaRequiredCommit SHA to read the note from
ttlOptionalToken TTL in seconds

Response

FieldTypeDescription
shaStringThe commit SHA
noteStringThe note content
refSha (TypeScript)
ref_sha (Python)
StringCurrent SHA of refs/notes/commits