-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 support for getting and replacing topics on a repository #634
Comments
Has topics support been added? |
@TheVetter Should be soon, I have reviewed the PR and still waiting response for the original author @peterkline |
While this issue is not fixed, we should be able to access the topics with the |
@migueleliasweb I am afraid not, as it requires calling another endpoint. ( |
I thought the same but apparently the topics list is returned from the repo itself. Ps: Dunno if this was a recent change on the API itself. |
@migueleliasweb You are right, the |
@sfdye I just wanted to list them =/ Anyway... I seem unable to get them even accessing the ipdb> ll
643 def get_repo(self, name):
644 """
645 :calls: `GET /repos/:owner/:repo <http://developer.github.com/v3/repos>`_
646 :param name: string
647 :rtype: :class:`github.Repository.Repository`
648 """
649 assert isinstance(name, str), name
650 headers, data = self._requester.requestJsonAndCheck(
651 "GET",
652 "/repos/" + self.login + "/" + name
653 )
--> 654 return github.Repository.Repository(self._requester, headers, data, completed=True)
655
ipdb> data["topics"]
*** KeyError: 'topics' |
@migueleliasweb You're missing the custom header |
@sfdye Pardon me, I totally missed that ! |
Hi @sfdye I ask since My app is dependent on this matter - and if it won't happen soon we'll have to develop this ourselves. Your help is much appreciated 👍. Edan |
@edanhauon The original author is not responding, so if you could open a new PR I am happy to review and cut a new version once that's merged. |
Could you maybe add me to the current PR so I could what has been done already? Thanks, |
@edanhauon what do you mean? |
@sfdye never mind, I see it in this thread. thanks. |
Sorry guys for not being around. Been buried with work related coding. if you can't wait for about 12 hours for me to make any mods and redo the PR then by all means fork off whats here. If you can wait I will finish the coding. |
@peterkline I can wait |
@peterkline same :) |
Patch works for me, with the notes mentioned in the PR, that is, it would be a little more user-friendly if you can pass that array back rather than having to send it as
vs
|
@wyardley suggestion accepted |
Anyone care to get this thing moving? Topic is a stable feature now, I wanna make it happen! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm proposing #832, which resolves the test failure, and I think resolves most of this feedback? It also switches the input to |
Merged in #832 thanks to @wyardley and credits to @peterkline for the original PR 🎉 |
* Add support for getting and replacing topics on a repository PyGithub#634 * Add / fix tests, accept list vs dict for replace_topics (PyGithub#634)
Topics are a fairly new feature within Github. Currently this functionality is provided in the API in a beta mode. We have a need to use these to add attributes and then consume them for automation. Hopefully this helps others.
API Documentation:
List topics in a repo
Replace topics in a repo
Examples of use:
The text was updated successfully, but these errors were encountered: