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

Add the ability to get repository ID and use repositories by ID #683

Closed
InAnYan opened this issue Aug 29, 2024 · 1 comment · Fixed by #690
Closed

Add the ability to get repository ID and use repositories by ID #683

InAnYan opened this issue Aug 29, 2024 · 1 comment · Fixed by #690

Comments

@InAnYan
Copy link
Contributor

InAnYan commented Aug 29, 2024

I haven't dug the GitHub API docs enough, but it seems there is such a thing: https://stackoverflow.com/questions/13902593/how-does-one-find-out-ones-own-repo-id

Getting repo id: https://stackoverflow.com/a/77904644

Accessing by repo ID: https://stackoverflow.com/a/74290453

As a user on StackOverflow said, it's undocumented, but GitHub support said it is supported.

Rationale for this feature:

  1. Symmetry: issue_number/issue, id/comment, etc. But repo is accessed by 2 strings
  2. No need to pass and handle bluky strings in users code. Just a slim number. (Besides you even require a String, not any other more generic type)
  3. It would be easier to write a wrapper around several Git Hosts, as one my use ids extensively, but this GitHub prefers strings of owner/repo..
@InAnYan
Copy link
Contributor Author

InAnYan commented Aug 29, 2024

I see you have RepositoryId type and ther is an id type in repository type.

But repository handler is tied up to owner/repo

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

Successfully merging a pull request may close this issue.

1 participant