Skip to content

feat: add configurable notes refs and a list-notes-refs API#38

Merged
necolas merged 2 commits into
mainfrom
git-notes-refs-sdk
Jul 10, 2026
Merged

feat: add configurable notes refs and a list-notes-refs API#38
necolas merged 2 commits into
mainfrom
git-notes-refs-sdk

Conversation

@necolas

@necolas necolas commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

(NOTE: This feature is behind a flag. Wait for it to be enabled before updating the public docs.)

A caller can now attach, read, append, and delete notes on any refs/notes/* ref instead of only refs/notes/commits, and can list a repository's notes refs to discover custom namespaces (for example review notes kept separate from other kinds).

The notes methods previously hardcoded refs/notes/commits and there was no way to enumerate notes refs. Add an optional notes ref to getNote/createNote/appendNote/deleteNote (get_note/... in Python, GetNote/... in Go), sent as the ref query param on reads and the ref body field on writes. A bare name like reviews is placed under refs/notes/ server-side (matching git notes --ref) and it defaults to refs/notes/commits, so existing calls are unchanged; targeting a custom ref requires the feature to be enabled server-side.

Add listNotesRefs/list_notes_refs/ListNotesRefs, which pages the notes refs under a prefix via GET /repos/notes/refs and returns each ref and tip SHA with a cursor, next_cursor, and has_more.

Document both in the code-storage skill and the per-SDK READMEs.

@notion-workspace

Copy link
Copy Markdown

@necolas necolas requested review from jacobbednarz and unknwon July 7, 2026 00:36
A caller can now attach, read, append, and delete notes on any
refs/notes/* ref instead of only refs/notes/commits, and can list a
repository's notes refs to discover custom namespaces (for example
review notes kept separate from other kinds).

The notes methods previously hardcoded refs/notes/commits and there
was no way to enumerate notes refs. Add an optional notes ref to
getNote/createNote/appendNote/deleteNote (get_note/... in Python,
GetNote/... in Go), sent as the `ref` query param on reads and the
`ref` body field on writes. A bare name like `reviews` is placed
under refs/notes/ server-side (matching `git notes --ref`) and it
defaults to refs/notes/commits, so existing calls are unchanged;
targeting a custom ref requires the feature to be enabled
server-side.

Add listNotesRefs/list_notes_refs/ListNotesRefs, which pages the
notes refs under a prefix via GET /repos/notes/refs and returns each
ref and tip SHA with a cursor, next_cursor, and has_more.

Document both in the code-storage skill and the per-SDK READMEs.
@necolas necolas force-pushed the git-notes-refs-sdk branch from 3f2c18c to a8cb8af Compare July 10, 2026 16:45
Ship the configurable notes refs and list-notes-refs work with a synchronized SDK release version:

- TypeScript: 1.14.0 -> 1.15.0
- Python: 1.13.0 -> 1.15.0
- Go: 0.12.0 -> 1.15.0
@necolas necolas force-pushed the git-notes-refs-sdk branch from a8cb8af to 8d6696c Compare July 10, 2026 17:00
@necolas necolas merged commit ecebcf7 into main Jul 10, 2026
3 checks passed
@necolas necolas deleted the git-notes-refs-sdk branch July 10, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants