Questions tagged [github3.py]

github3.py is one of the most highly recommended wrappers for version 3 of GitHub's API written in Python

github3.py has a simple API which covers the entirety of version 3 of GitHub's API. It contains well documented methods and attributes and has online documentation which contains several examples.

It was created and is still in a large part authored by Ian Stapleton Cordasco. It is licensed under the 3-clause BSD license.

76 questions
6
votes
3 answers

Issue with JWT token authentication in PyGithub

I want to create a github app in python, and I'm stuck at the authentication part. Since they don't support python by default, I have to use a third party library. After I generate the JWT token I can successfully authenticate with curl, but not…
ilo
  • 316
  • 2
  • 12
6
votes
1 answer

How can I find all public repos in github that a user contributes to?

I'm using the github3 python library and am trying to find all public repos that users from our organization have contributed to (to reward the support of open source!). I've got the list of users for the organization, but now what? Can I use the…
3
votes
2 answers

github3 0.9.6 TypeError:pop() takes at most 1 argument (2 given)

I am currently using github3.py version 0.9.6, and am receiving an error upon invoking the github3.organization(login) function: Traceback (most recent call last): File "Main.py", line 23, in __main__() File "Main.py", line 19, in…
edigiovine
  • 31
  • 1
  • 5
3
votes
1 answer

GitHub API get issues description using Python

The task: (using GitHub API) 1) get all closed milestones for a given repo 2) get all issues for that milestone 3) for every issue get it's description 4) finally, using Markdown for example, create a page for PM to view I'm using Python 3.5, using…
Naim Salameh
  • 387
  • 4
  • 18
3
votes
1 answer

Count total number of lines in a github pull request file

I'm using the github3.py library to query changes in files associated with pull requests. I have the code written below that retrieves the total number of line changes made to the file. I would like to expand this to come up with a percentage of…
DBS
  • 1,107
  • 1
  • 12
  • 24
3
votes
1 answer

Getting committer emails

I am trying to get the email addresses of the committers of a project to specific files. After creating a query that finds the code files in a list of repos matching specific criteria, I get the correct results in the form of code_results (of type…
Sarah
  • 33
  • 2
3
votes
1 answer

Is there an easy way of reverting an already merged Pull Request using the API?

github provides a "Revert" button in it's web interface, which allow us to revert a pull request that was already merged. This always involves, to the best of my knowledge, creating a new pull request to revert the changes. Is it possible to…
mvallebr
  • 2,388
  • 21
  • 36
3
votes
2 answers

How to create an issue comment on a pull request?

According to this question a PR is just an issue with some things on top. How to get the associated issue id? I just saw issue_url as attribute for the pull request object. Also, PR has the method create_review_comment but no method…
mvallebr
  • 2,388
  • 21
  • 36
3
votes
1 answer

AttributeError: 'PullRequest' object has no attribute 'issue_comments'

I'm using https://github.com/sigmavirus24/github3.py and I'm having problem with getting issue_comments from PR. for pr in repo.iter_pulls(): for comment in pr.issue_comments(): print comment I'm getting AttributeError: 'PullRequest'…
mihazelnik
  • 33
  • 2
2
votes
1 answer

Python Github3 library how to get the exact content of generator of ShortOrganization

I'm using the Github3 library to access the Github Enterprise API. I'm trying to get all organizations a specific user has, but after I got the generator of ShortOrganization, I don't know how to actually get the organization name, can anyone…
Minwu Yu
  • 311
  • 1
  • 6
  • 24
2
votes
1 answer

github3.py Repository class is there a way to "Create" a branch?

Using version 1.0.0a4 of the github3.py library. I am trying to create a new file in the repository on a new branch. Assumption: gh is an authenticated object. repo = gh.repository('User','Repo') repo.create_file(path='NewFile',message='Commit…
Matt
  • 21
  • 4
2
votes
1 answer

How to create a Pull Request using github3.py API?

This seems to be supported in the github web api, but I found no example in the docs and it doesn't seem to have been implemented in the API. Am I missing something? Is it possible to create a PR through github3 python API?
mvallebr
  • 2,388
  • 21
  • 36
2
votes
1 answer

List repos of a user

Hey I've been reading up on the github3.py, but can't find a clear explanation of how to retrieve a list of a user's repositories. It seems that there should be a simple solution like a method or a attribute to the user object. I just can't seem to…
Vangogh500
  • 939
  • 1
  • 7
  • 17
2
votes
1 answer

To get all github users details

I want to get the github users and their location. I know there is Github apI(GET /users) which can provide me the list of user. Currently I am using PyGithub to access the github but seems this library hasn't implemented this API. Can anyone please…
Rakesh
  • 3,987
  • 10
  • 43
  • 68
1
vote
1 answer

How to handle GitHub search API rate limits

I'm building an automated script to do some recurring search using GH search API. However I hit the "Secondary" rate limit sometimes. For referece I'm using github3.py library. So my workaround so far is to check the rate limit before each search…
po5i
  • 548
  • 5
  • 19
1
2 3 4 5 6