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
0
votes
1 answer

Python read string object and search for a format

I am using pyGithib library view the contents of all the files ending with *.rb in github repo, Using that library i get a string which is in this format desc 'heading \'Test this too\') Rationale: Best Practice …
krisdigitx
  • 7,068
  • 20
  • 61
  • 97
0
votes
3 answers

pyGithub Pull request invalid head (422 API error)

Recently I've been trying to use pyGithub to create some automated PRs after running a make update in a bunch of repos using this snipppet. body = 'Test PR 2 please ignore' pr = repo.create_pull(title="Test PR please ignore", …
0
votes
1 answer

AttributeError: '_pygit2.Reference' object has no attribute 'get_object'

I'm trying to automate the task of creating and cloning a repository in my remote, when I run the following code, it seems that the method I'm trying to use may have been deprecated. What is the alternative method? from github import…
ScottyBlades
  • 12,189
  • 5
  • 77
  • 85
0
votes
1 answer

Python get list of csv files in public GitHub repository

I am trying to pull some csv files from a public repository using Python. I have the code to process the data after I have the files' URL. Is there some sort of equivalent to ls for GitHub? I'm not seeing anything in GitHub's API, also it seems like…
user1543042
  • 3,422
  • 1
  • 17
  • 31
0
votes
1 answer

Accessing private instances of Github and Gitlab through their respective Python APIs

Can I access private instances of Github and Gitlab through API wrappers in python such as pygithub and python-gitlab. For example, if I want to access my company's private server of Github and Gitlab, is it possible? Any help on the matter would be…
Saurav Saha
  • 745
  • 1
  • 11
  • 30
0
votes
2 answers

Is it possible to commit and push into a remote repo from my local system using only the github api v3?

Ok, this seems like a stupid question and I don't have a lot of experience using git as I have always been dependent on GitHub desktop for my work. So my question is, Can a github remote repo be committed to and pushed to via only the github api.…
Saurav Saha
  • 745
  • 1
  • 11
  • 30
0
votes
1 answer

PyGitHub Issue get_comments()

I want to get all comments of all Github`s issues. I've read the guide here: https://buildmedia.readthedocs.org/media/pdf/pygithub/stable/pygithub.pdf Following the script: from github import Github g = Github(base_url="https://github.com/api/v3",…
user6484190
0
votes
1 answer

Using PyGithub basic script complains "No module named 'requests'"

I am using PyGithub from https://github.com/PyGithub/PyGithub to try out the github API to collect data from my code repository. I did the following to try install all that is needed. sudo pip3 install PyGithub sudo pip3 install requests sudo pip3…
AdeleGoldberg
  • 1,289
  • 3
  • 12
  • 28
0
votes
2 answers

How can I get an users website with PyGithub?

How can I get an GitHub users website (the one displayed on a users profile) with PyGithub (Github API v3)?
thinwybk
  • 4,193
  • 2
  • 40
  • 76
0
votes
1 answer

github.GithubException.GithubException: 401 on Heroku when want to create a repo on user's public repo- Github API

I am making this app using python, Flask_OAuthlib, and heroku to get access to the public repo of user's Github and create a repo and copy the required files over there. The app gets connected and also receives the following permissions as an…
BobbyF
  • 431
  • 1
  • 7
  • 19
0
votes
1 answer

how to fetch my pull requests from my github account to my python script and fetch the date and persons reviewed using pygithub

I am developing a tool to fetch all my pull requests and their dates in the repository of my organisation. How am I supposed to fetch pull requests raised from my account? I have used pygithub and used the access token and login into my github…
vignesh babu
  • 334
  • 3
  • 8
0
votes
1 answer

python github library - listing security alerts on a repo

I am working on a python script that gets a specific repository by name, ultimately I want to see if there are any security alerts associated with it. Thus far I can get the repo using the python git library, however I can seem to find a way to get…
Lombax
  • 851
  • 4
  • 9
  • 25
0
votes
3 answers

How to place a created file in an existed GITLAB repository through python

I have created a text file using file operations in python. I want the file to be pushed to my existed GITLAB repository. I have tried the below code where i get the created file in my local folders. file_path = 'E:\My material\output.txt' k=…
Mike
  • 25
  • 6
0
votes
0 answers

Use Python along with Github API to collect data from a repo

I'm researching on a project, which involves python to use GitHub API to collect the no of stars, contributors, PR's and issues from a repo (https://github.com/ and store it in a CSV file. I'm trying to use BeautifulSoup4, but API method is a more…
DirectedSoul
  • 81
  • 10
0
votes
1 answer

Alphabetically enumerate files in directories with attributes

I'm trying to enumerate in alphabetical order two lists of files based on different directories. One list is the files in my directory using the following code: import os file_list = os.listdir('./') for x in file_list: print(x) which will…
Tom
  • 571
  • 2
  • 11
  • 29
1 2 3
13
14