Questions tagged [pygithub]

PyGitHub is a Python library implementing the GitHub REST API v3, to manage GitHub resources (repositories, user profiles, organizations, etc.) from Python scripts.

PyGitHub is a Python library implementing the GitHub API v3, to manage GitHub resources (repositories, user profiles, organizations, etc.) from Python scripts.

See also

210 questions
1
vote
1 answer

building docker image using a remote docker file in github using python sdk

I am able to build docker image using python sdk. if the dockerfile is available on my local machine. client = docker.from_env() image, build_log = client.images.build(path = "./", tag=image_name,rm=True) Now, My docker files will be maintained…
karas27
  • 335
  • 1
  • 5
  • 15
1
vote
0 answers

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 FILENAME_ISSUES = REPO + 'issues2.json'#name of JSON which saves…
John
  • 23
  • 4
1
vote
0 answers

PyGitHub: making sense of rate limiting and managing the number of requests

The issue I exceed the GitHub API rate limit when I use PyGitHub – but not when I use bare-bones HTTP requests. This is strange because my custom client can get what I need in ≈500 requests while the PyGitHub exceeds the 5000 to get the same…
conner.xyz
  • 6,273
  • 8
  • 39
  • 65
1
vote
0 answers

Unable to create multiline comments using PyGithub/PullRequest.create_review()

I am trying to automate a workflow for reporting automated test results to students by posting them in a pull request using the create_review() function defined in PyGithub/PullRequest.py. Here is my simple code snippet: #!/usr/bin/env python import…
1
vote
1 answer

Usability of Python library PyGithub in production grade projects

Just wanted to know if it is a good idea to go head with the PyGithub. I am not asking for opinions. What I have learned is that before using any library, one of the most important things that we should look for is the backing(of…
Asif Kamran Malick
  • 2,409
  • 3
  • 25
  • 47
1
vote
1 answer

How to create private repository in Github using PyGithub

I figured out how to create repository on Github using PyGIthub by this method: import sys from github import Github g = Github('AryanshMahato', 'GITHUB_PASSWORD') user = g.get_user() repo = user.create_repo(folderName) But in this case PyGithub…
1
vote
2 answers

PyGithub authentication troubles

I am using PyGithub with an access token from Github I got here to create a command line tool with click. My code is as follows: from github import Github def readEnvironment(): 'This function reads in the environment variables form a file if…
wogsland
  • 9,106
  • 19
  • 57
  • 93
1
vote
0 answers

PyGithub in Django; ModuleNotFoundError

I am attempting to run the GitHub API client PyGithub in my Django project but I'm not sure how to import it. I have tried to move the file and change directories but nothing seems to work. Below is my views.py file: from django.shortcuts import…
phast
  • 188
  • 1
  • 2
  • 12
1
vote
1 answer

Get all the file Contents of a repo at Specific Commit using PyGitHub

I want to get the file contents of all the files in the repo [changed and unchanged] using the Python [PyGitHub API]. But not sure how to achieve it. Simply, to browse the repo at that specific commit id in history. Is there any other API to get…
lucifer7
  • 13
  • 3
1
vote
0 answers

How can I make a cherry-pick with PyGithub?

I am using PyGithub in a personal project. I have two repositories: upstream and fork. I want to backport a commit from my fork's master branch into an older version branch. And then submit a pull request to the upstream's older version branch with…
Leonardo Coelho
  • 175
  • 2
  • 10
1
vote
1 answer

how can to send files every period of time?

my file format looks like this report_10_04_2019_18_10_38. I want to check every time if there is a new file and if exist a new file sends to my private repo. I want to keep looking for new files and every 15 minutes or 1 hour send the files back to…
jahjh21a
  • 89
  • 11
1
vote
0 answers

How to list all issues on an Enterprise Github using PyGithub

I've got a quick question about (hopefully) making my code a lot more efficient. currently I have something like the following: g = Github(base_url = "https://github.companyName.com/api/v3" ,login_or_token="my_token") repos = g.get_repos() for repo…
1
vote
2 answers

trying to access Github issue comments using PyGithub library

I am trying to access issue comments using PyGithub library. this is the function which I implemented, def get_issue_comments_dict(self, repository): """ get issue comments outputs reponame: issue title, issue url,…
1
vote
1 answer

Creating Gist with PyGithub

Is there an option to create new Gist with PyGithub? There is such API option on GitHub, however it seems to be missing in PyGithub.
MrBr
  • 481
  • 4
  • 5
1
vote
1 answer

How to extend Django AuthenticationForm

I'm writing a web app and I want to add a required checkbox to Django's AuthenticationForm I don't know how to extends (or override ?) the AuthenticationForm. Here's where I call the auth form in my template :

Login