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

Fix panic when getting notes by ref (#23372) #23377

Merged

Commits on Mar 8, 2023

  1. Fix panic when getting notes by ref (go-gitea#23372)

    Fix go-gitea#23357 .
    
    Now the `/repos/{owner}/{repo}/git/notes/{sha}` API supports getting
    notes by a ref or sha
    (https://try.gitea.io/api/swagger#/repository/repoGetNote). But the
    `GetNote` func can only accept commit ID.
    
    https://github.com/go-gitea/gitea/blob/a12f5757372f751d25f9e5ca1f168f6920ded894/modules/git/notes_nogogit.go#L18
    
    So we need to convert the query parameter to commit ID before calling
    `GetNote`.
    Zettat123 authored and GiteaBot committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    12f277a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    96c5567 View commit details
    Browse the repository at this point in the history