Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository.notes KeyError when empty #1291

Closed
qaqland opened this issue May 22, 2024 · 1 comment
Closed

Repository.notes KeyError when empty #1291

qaqland opened this issue May 22, 2024 · 1 comment

Comments

@qaqland
Copy link

qaqland commented May 22, 2024

repo = pygit2.Repository("xxx-repo")
try:
    repo.notes()
except KeyError as e:
    print(e)

get:

"reference 'refs/notes/commits' not found"

when refs/notes or other note-name not fount, it means note is empty and should return None


pygit2: 1.15.0

@qaqland
Copy link
Author

qaqland commented Aug 20, 2024

after checking upstream, i think error is the expect behavior.

sorry for this issue

@qaqland qaqland closed this as completed Aug 20, 2024
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

No branches or pull requests

1 participant