74 questions
1
vote
1
answer
709
views
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 ...
0
votes
0
answers
64
views
Is the GitHub API down or am I doing something wrong?
I am attempting to use the github3 Python API and am encountering authentication errors when attempting to acess profile information.
To reproduce (after sudo pip install github3.py):
from github3 ...
0
votes
1
answer
213
views
How to solve exception 410 in python?
I am working to extract issues data from a repo on Github using Github3.py.
The following is a part of my code to extract issues from a repo:
I used these libraries in the main code:
from github3 ...
1
vote
0
answers
92
views
List of repositories that use github3 library
I am moving to github3 after spending a lot of time on GitHub API v3 and also trying PyGithub. No doubt, github3 is super fast, uses GitHub rate limit extremely efficiently and closely resemble native ...
0
votes
1
answer
847
views
How to put labels on new pull request using github3.py?
I saw that github3.py still doesn't have the attribute labels on Repository.create_pull() as in Repository.create_issue(). But there is the property labels on ShortPullRequest created. So I tried:
...
1
vote
1
answer
1k
views
How to get all merged pull requests since last tag was added using github3.py?
I am trying to identify all merged pull-requests that happened since last release was made. A release always has a tag, so the logic is to find any pull-requests that happened after that tag was ...
1
vote
0
answers
76
views
Github3.py returns only issues till May 2020 (1000 issues) but I need for past 2 years and then wish to plot using Line Chart
import github3, json, os.path
gh = github3.login(token="d6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")#Access token
REPO = 'angular'#name of repository
...
0
votes
1
answer
272
views
GitHub App access to other repositories in organization
I have a Github App created under an organization and is installed to a repository under the same organization. This app needs read access to other repositories in the same organization for fetching ...
1
vote
1
answer
341
views
GItHub App access to repositories in organization
I have a Github App created under an organization and is installed to a repository under same organization. I tried reading a file from the same repository after authenticating using github3 ...
0
votes
1
answer
62
views
Can't have authorization for the app_installations methode
I'm working on a github application and my actual task is to retrieve list of github user account / github organization on which the app has been installed.
So basically, I'll be using the ...
1
vote
2
answers
2k
views
How to obtain the github organization and repository name from a local clone repository with python?
Apparently github3 module does require you to feed it github organization and repository name as is not able to guess them based on your current repository.
I also checked the https://pypi.org/...
0
votes
1
answer
133
views
Clone a Githubenterprise Repo using python libraries
I am using github3.py library for my remaining code modules.
So if possible can we use github3.py lib for cloning a repo or any other python library is also good.
0
votes
1
answer
721
views
Is there a way to include github3.py as an Ansible Playbook library or module, without installing via pip?
My playbook needs to be able to support adding a tag to a github repository when a production deployment is performed. The intent is to automate the generation of a release tag via Ansible's built in ...
7
votes
4
answers
3k
views
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 ...
1
vote
1
answer
420
views
Github3.py 1.3.0 Get timestamp for commit
I looked through the documentation and even the source code and I can't seem to figure out how to get the timestamp of a commit using the github3.py library. I'm, pretty sure it's there because, well, ...
1
vote
1
answer
247
views
github3.py v1.3.0 AttributeError: iter_repos
I am trying to iterate over all repositories in a private organization. Here is some example code that does not work on my machine (Windows 10, Python 3.6.5):
import github3
session = github3.login(...
2
votes
1
answer
187
views
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 ...
0
votes
1
answer
225
views
github3.py login using ssh keys
Is there a way to use github3.py python library to access github with a SSH key?
I'm trying to create a service that writes on some repositories using a machine user for security reasons.
1
vote
1
answer
171
views
Can github3.py be used to find the parent/upstream of a forked repo?
Given a forked repo, how can I use github3.py to find the parent or upstream repo that it was forked from? This is fairly easy with requests but I can not figure out how to do it in github3.py.
With ...
1
vote
1
answer
1k
views
How to get my private repositories in github using github3 library?
I have generated a github access token. I've tried to access the repos from pygithub and also github api v3, stuff was fine.
Now using github3 I cannot access my private repos. I am using python(I ...
2
votes
1
answer
657
views
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')
...
1
vote
0
answers
114
views
github3.repos.contents.content return an empty object
I want to get the content of a file that it's storing configuration.
I'm using the following code:
repos = [f for f in gh.iter_user_repos(git_org, branch)]
modules = {}
modules_infos = {}
for a in ...
1
vote
1
answer
2k
views
list tags and tag content using github3
We tag commits on a weekly basis, and I want to issue a report to see the tag names and their content, I tried the following using python 3.x and github3
import github3
g = github3.login(token='...
0
votes
2
answers
5k
views
How to get GitHub user names and emails for a specific team or repository
How would one use Python and the GitHub API to obtain user details (user name, email, location) for a particular team (or repository)? The teams are not public, but I am a member of the team I'm ...
0
votes
2
answers
706
views
delay between requests using github3 in python
I'm using python github3 module and i need to set delay between request to github api, because my app make to much load on server.
I'm doing things such as
git = github3.GitHub()
for i in itertools....
0
votes
1
answer
222
views
How do I specify team permissions on github3py
I'm trying to do a simple script of adding repositories to a team with github3py.
The add_repo(repo, team) method doesn't have anyway to specify what kind of permission I want my team to have, ...
0
votes
1
answer
237
views
How to pull only modified commits/pull requests using github3.py?
I'm writing an ETL job where I keep an updated list of commits, pull requests, and files from our GitHub repos in our data warehouse. I'm currently storing and passing in etags to the various ...
0
votes
1
answer
3k
views
How to Get And List All files from a Github Repository
I am trying to list all files from a Github repository.
def listFiles(self, filepath):
git = githubHandler(GH_USERNAME, GH_PASSWORD)
gh, repo, branch = git.connect_to_github()
...
0
votes
1
answer
335
views
Recommended way to list all repos/commits for a given user using github3.py
I'm building a GitHub application to pull commit information from our internal repos. I'm using the following code to iterate over all commits:
gh = login(token=gc.ACCESS_TOKEN)
for repo in gh....
0
votes
1
answer
232
views
Save csv file with different name from revisions of gist and show the difference
i have a gist(csv format) which updates on a daily basis and contains n revisions. Each revision data is different from one another.
I need to know the difference between each revision so i used ...
0
votes
1
answer
531
views
Getting revisions data from Github gist
gist_ids = 'abc'
def main():
gh = github3.login (
token=os.environ.get('my_token'),
url=' ')
my_gist = gh.gist(gist_ids)
resp = github3.gists....
0
votes
1
answer
61
views
github3.py authorisation lost tokens / multiple machines
I am probably doing something stupid, but...
When attempting to retrieve a token with code like this:
auth = github3.authorize(user, password, scopes, note, two_factor_callback = two_factor_callback)
...
3
votes
2
answers
11k
views
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 <...
0
votes
0
answers
35
views
Technique to use preview API's
I often find I want to use preview APIs that GitHub offers. Is there a recommended way to add those APIs to minimize hassles when they become supported? (e.g. https://developer.github.com/v3/repos/...
3
votes
1
answer
3k
views
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 ...
0
votes
1
answer
246
views
Using github3.py, how do I increase GitHub's rate limit using only client_id and client_secret?
I want to increase GitHub's rate limit by passing client_id and client_secret with the request. I don't want to use user/pass or OAuth authentication. I just want to make a request equivalent to:
...
1
vote
0
answers
374
views
Retrieve statuses of given branch using github3.py
I'm trying to retrieve the latest (last) description attribute of the status of a pull request by making the following call below. And, then create logic from there on how to process the pull request ...
1
vote
1
answer
876
views
Add image to pull request comment
I'm using the github3.py library to create a comment in a pull request from the columns field in a csv file. I would like to add an image to the comment along with the output from the columns, but I ...
0
votes
0
answers
267
views
How can I install github3.py via my setup.py?
I want to use github3.py module on my pyramid application.
In my develop enviroment, I can install github3.py via pip and this works fine.
But I need to add github3.py to setup.py for production ...
0
votes
1
answer
433
views
How to get contents of a file from certain tag
I'm writing an update script for project, where remote code should update certain files according to provided version number.
For this purpose tags (releases) are created in github.
Now I would like ...
0
votes
1
answer
2k
views
TypeError: 'GitHubIterator' object does not support indexing [duplicate]
Using github3.py, I want to retrieve the last comment in the list of comments associated with a pull request and then search it for a string. I've tried the code below, but I get the error TypeError: ...
0
votes
1
answer
132
views
clone url of a pull request
I'm trying to get the clone URL of a pull request. For example in Ruby using the Octokit library, I can fetch it from the head and base like so, where pr is a PullRequest object: pr.head.repo....
1
vote
2
answers
188
views
"InvalidSchema" when attempting to create file with github3.py
Using github3.py 1.0.0a4, I am trying to make a basic "server" program that creates, updates, deletes, and fetches files. However, my program raises "InvalidSchema" on attempt to create a file. Why? I ...
0
votes
1
answer
573
views
Why does my repository object return Nonetype with github3.py?
Using github3.py version 0.9.5 documentation, I'm trying to create a repository object but it keeps returning Nonetype and therefore I am unable to access the contents of the repository. There doesn't ...
0
votes
2
answers
100
views
Is github3py thread-safe?
Does anytone knows if github3py is threadsafe.
Specifically:
GitHub.repository()
Repository.iter_pulls()
Repository.branch()
Repository.create_status()
None of the threads edit the objects, just ...
1
vote
1
answer
330
views
User Attribute Errors on github3.py Login
Recently had a fun project idea and wanted to utilize the GitHub API, so I searched around for a Python wrapper. On the GitHub libraries page I found github3.py
After looking at their docs
I get an ...
1
vote
1
answer
270
views
Why does github3.py ask for a second authentication factor twice?
I'm using github3.py to access my organization's Github account, and we have two-factor authentication enabled. I'm starting by listing the repositories. Here's the code:
import os
import github3
...
3
votes
1
answer
2k
views
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 ...
0
votes
1
answer
652
views
Is there a way to get Tag objects instead of Reference ones when listing tags from a repository?
I'm able to successfully list tags from a repository using github3 using:
repo.iter_refs(subspace='tags')
That results in a generator of github3.git.Reference objects. Is there a way for me use a ...
1
vote
1
answer
120
views
github3.py AttributeError with IssueEvents
I've got some code which has been using github3.py successfully to iterate through issues in a repo and pull out various stats.
All of a sudden I'm getting an error when trying to iterate the events ...