Comments (5)
Hey @kitallis thank you for bringing this up. This particular API set is confusing.
So we have all of the GitHub REST API set for references - breaking them down below quickly for clarity - It looks like we have a couple of problems.
All this to say, thank you for being open to get this sorted, please feel free to do so! ❤️ Also, even though this is wrong I'm feeling like it will be a breaking change - we'll version as such so that anyone using these SDKs will have a heads up on the change.
Here are the details. Please feel free to correct both implementations if you have time. Head's up on the cassette, they might need to be regenerated.
- List matching refs: https://api.github.com/repos/OWNER/REPO/git/matching-refs/REF (supports tag or branch names)
- List all matching references: https://api.github.com/repos/OWNER/REPO/git/matching-refs
- Get a reference: https://api.github.com/repos/OWNER/REPO/git/ref/REF (supports tag or branch names)
- Create | Update | Delete references all use: HTTP verb + https://api.github.com/repos/OWNER/REPO/git/refs/REF
Thank you again for helping to make our community better!
from octokit.rb.
Thanks @nickfloyd.
I had to squint to understand why you pointed out the "List matching refs" to be an incorrect implementation. Just adding some more info here for clarity:
List matching refs is actually just one API. Documented here.
This API also claims in the docs, that the ref
is a required field. While simultaneously saying the bit about When you use this endpoint without providing a :ref...
etc. Which means it's technically not a required field?
This perhaps means that the octokit interface should either optionally take a ref or implement the two ways as different methods. I will give a shot at "Get a reference" over the weekend since that's my current need. If the others are equally simple to change, I can correct them as well.
from octokit.rb.
This is still on my radar. I will come back to it soon.
from octokit.rb.
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs
. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
from octokit.rb.
Hey @kitallis thanks for the follow up here.
I'll leave the implementation in your capable hands! Either implement as an optional parameter or as an overload with different signatures (as two separate methods). My gut would favor being more explicit and having two methods but SDKs are meant to abstract out complexity and expressiveness so that consumers don't have to know the implementation details of a given API - in this case I feel like both options that you present still serve the SDK philosophy well.
I'm looking forward to seeing what you come up with! As always thank you for being a member of this community and working to make things better for everyone ❤️ !
from octokit.rb.
Related Issues (20)
- [FEAT]: add missing endpoints HOT 2
- [BUG]: OAuth token auth applies a different Authorization header than using curl or postman HOT 6
- [DOCS]: README and yardocs refer to deleted method `#create_authorization` HOT 1
- [FEAT]: Refresh a user's access token with refresh token HOT 1
- Test issue HOT 1
- [FEAT]: Support Org Secrets HOT 1
- Get Projects by personal access token-Must have admin rights to Repository HOT 3
- [FEAT]: Provide response types with Sorbet HOT 1
- [BUG]: HTTP caching middleware returns cached responses to wrong users HOT 4
- [BUG]: `list_app_installation_repositories` does not return `rels` HOT 1
- [BUG]: Net::OpenTimeout (Faraday::ConnectionFailed) for request in threads HOT 1
- [FEAT]: timeline events are not supported? HOT 2
- How to get repository by its ID? HOT 2
- [FEAT]: Add Full Code Scanning Support HOT 1
- [DOCS]: How can I use octokit to manager new project HOT 1
- [DOCS]: Fix / update generation for the docs for Octokit.rb HOT 1
- [BUG]: `faraday-multipart` warning always printed HOT 2
- [FEAT]: Enable and disable automated security fixes on a repo HOT 1
- [BUG]: `create_pull_request_comment`'s `line` needs to be optional to use optional `subject_type` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octokit.rb.