Skip to content

getNote

Read the note for an object.

The notesRef argument is the canonical name of the reference to use, defaulting to "refs/notes/commits".

The id specified is the Oid of the git object to read the note from.

Signature

ts
class Repository {
  getNote(id: string, options?: FindNoteOptions | null | undefined): Note;
}

Parameters

  • idrequired · string

    OID of the git object to read the note from.

  • optionsnull | FindNoteOptions

    Options for finding note.

    • notesRefstring

Returns

  • Note

    Instance of the note.

Errors

  • Error

    Throws error if note does not exists.

Released under the MIT License.