Skip to content

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

@xmo-odoo

Description

@xmo-odoo

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions