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 method to list repository topics #581

Merged

Conversation

martinvanzijl
Copy link
Contributor

@martinvanzijl martinvanzijl commented Oct 30, 2019

For #546.

Adds method GHRepository.listTopics.

NOTE: The method to update repository topics does not work yet, so I have commented it out. It may not have been implemented in the underlying API. I recommend keeping the issue open until this is working.

For hub4j#546.

The method to update repository topics does not work yet. It may
not have been implemented in the underlying API.
@@ -1744,4 +1744,29 @@ String getApiTailUrl(String tail) {
public GHIssueEvent getIssueEvent(long id) throws IOException {
return root.retrieve().to(getApiTailUrl("issues/events/" + id), GHIssueEvent.class).wrapUp(root);
}

// Only used within getTopics().
Copy link
Member

Choose a reason for hiding this comment

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

Is this used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I mean "listTopics()". I've updated the comment now.

* Set the topics for this repository.
* See https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository
*/
// This currently returns a "404" error (as of 30 Oct 2019).
Copy link
Member

Choose a reason for hiding this comment

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

Hm, interesting problem. Do you want to try to figure it out before merging or do you believe it is a bug on their side?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess it is a bug on their side. I also tried using curl which gave a "404" response, too. Shall I raise a query with GitHub support?

I suggest merging the getter method but keeping the issue open, so we know to re-visit later and add the setter method.

Copy link
Member

Choose a reason for hiding this comment

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

Sure merging this makes sense.

@bitwiseman bitwiseman merged commit 5b53fba into hub4j:master Nov 1, 2019
@martinvanzijl martinvanzijl deleted the issue_546_list_repository_topics branch November 2, 2019 02:12
@martinvanzijl
Copy link
Contributor Author

Thanks!

I also raised a query to GitHub support to ask whether the setter feature is enabled yet.

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.

2 participants