Skip to content

Adds the ability to get a repository by ID - #517

Merged
bitwiseman merged 1 commit into
hub4j:masterfrom
jamesatha:repo-by-id
Jun 20, 2019
Merged

Adds the ability to get a repository by ID#517
bitwiseman merged 1 commit into
hub4j:masterfrom
jamesatha:repo-by-id

Conversation

@jamesatha

Copy link
Copy Markdown
Contributor

Fixes: #515

@bitwiseman bitwiseman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! It would be great to get some tests before we merge, but so it goes.

* Gets the repository object from its ID
*/
public GHRepository getRepositoryById(String id) throws IOException {
return retrieve().to("/repositories/" + id, GHRepository.class).wrap(this);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamesatha Is there this endpoint documented? I was not able to find it here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Officially no. But it is supported. The issue filed gives a bit more info about it's "documentation" and how other clients support it: #515

@bitwiseman
bitwiseman merged commit dccb43f into hub4j:master Jun 20, 2019
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 this pull request may close these issues.

Allow getting a repository by ID

3 participants