Skip to content

[FEAT]: Ref methods should support full names with or without the refs/prefix #1808

Description

@tmobaird

Describe the need

The create_ref method supports refnames with or without the refs/ prefix. This is a really nice quality of life feature for consistency. The following ref methods do not include this:

  • ref
  • update_ref
  • delete_ref

It would be great to add this support for these methods as well.

SDK Version

No response

API Version

No response

Relevant log output

> client.ref("tmobaird/octokit-testing", "refs/heads/tmobaird-patch-1")
/Users/tmobaird/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/octokit-10.0.0/lib/octokit/response/raise_error.rb:14:in `on_complete': GET https://api.github.com/repos/tmobaird/octokit-testing/git/refs/refs/heads/tmobaird-patch-1: 404 - Not Found // See: https://docs.github.com/rest/git/refs#get-all-references-in-a-namespace (Octokit::NotFound)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is being looked at and prioritizedType: FeatureNew feature or request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions