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

[Schema Inaccuracy] incorrect ref parameter specification for ref deletion #3358

Open
xmo-odoo opened this issue Jan 30, 2024 · 0 comments
Open

Comments

@xmo-odoo
Copy link

xmo-odoo commented Jan 30, 2024

The parameter is currently documented as:

The commit reference. Can be a commit SHA, branch name (heads/BRANCH_NAME), or tag name (tags/TAG_NAME). For more information, see "Git References" in the Git documentation.

The first one is definitely not true, using a sha as ref fails with a 422 (which itself is a strange return code, one would expect a 404 when trying to delete a ref which does not exist?)

I think the wording of the rest of the documentation, while strictly speaking correct, is also a bit misleading:

  • any ref can be deleted via this endpoint not just branches and tags
  • it gives the impression that ref can be a branch or tag name, which they can't (they have to be refnames)

The List matching references endpoints also lists commit SHA as valid refs to lookup. As far as I can tell that's not true, if a sha is passed in it'll be looked up like a normal ref (prefix-matched to the repository's actual refs), creating refs to a commit then passing that commit to the endpoint always returns a 200 with an empty list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants