Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
84 views

When querying the referral sources endpoint on GitHub I'm only getting an empty list returned. I can get data for other endpoints in the same repo, even for other traffic endpoints. I'm expecting ...
mjpeterson's user avatar
0 votes
1 answer
53 views

I was wondering how would I unfollow someone using PyGithub It's a program that unfollows every person that follows me (to follow organizations only) I tried the following code but it gave me 404 page ...
Isus Ramzy's user avatar
1 vote
1 answer
111 views

I have a large git repo with multiple .Net solutions in it (in the example repo there is only one). I want to return the paths of all the Directory.Packages.props files within that specific repo. I am ...
AC4's user avatar
  • 704
1 vote
1 answer
264 views

I am currently facing issues with the GitHub Search API where the number of search results significantly differs from what I see on the GitHub web app. I would like to understand these discrepancies ...
moizhmed's user avatar
0 votes
0 answers
47 views

I am trying to push a mp4 file from my local storage to my github repo using PyGithub with the following code. from github import Github import base64 # Authenticate to GitHub token = "my_token&...
sec's user avatar
  • 1
0 votes
1 answer
176 views

I was looking through the PyGithub documentation https://pygithub.readthedocs.io/en/latest/introduction.html but I can't find any function that returns the default branch. In the examples, "main&...
engineer-x's user avatar
  • 3,415
0 votes
0 answers
136 views

I'm trying to add multiple files into a single commit using PyGithub. I'm looping in my local directory to fetch all the files to be committed and then I'm trying to create a git blob for each. Then I'...
Arunava Paul's user avatar
0 votes
0 answers
82 views

branch.edit_protection( enforce_admins=desired_protection_settings["enforce_admins"], required_linear_history=desired_protection_settings["...
Anastas.R's user avatar
  • 101
4 votes
2 answers
675 views

I want to download the attachments in a GitHub issue programmatically. Using the GitHub API Python SDK I can authenticate and get the Issues and comments for a private repository. The API doesn't have ...
palako's user avatar
  • 3,510
1 vote
0 answers
108 views

I tried passing the most recent SHA to Commit.get_pulls but that does not give expected results. It returns an empty paginatedList even though I have a PR for the SHA in question . . . I'm using ...
GuyMatz's user avatar
  • 705
0 votes
1 answer
724 views

I have a text file with a list of repos. I wanted to use pygithub to iterate through the list and tell me for each repo on whether the last build was successful or failure on dev or master branch ...
DevopitionBro's user avatar
2 votes
1 answer
174 views

My python script is getting a list of PRs and then it needs to run a check if the branches being used in those PRs are out-of-date from their base branch or not. I need to perform this action remotely ...
Syed Faraz Umar's user avatar
0 votes
1 answer
50 views

How can we get the avatar of a GitHub user using PyGitHub? Github.get_user gives NamedUser | AuthenticatedUser, however, neither NamedUser nor AuthenticatedUser have any functions for getting the ...
kostrykin's user avatar
  • 4,334
0 votes
1 answer
384 views

I've been developing a portfolio website and part of the data for the projects (like the project summaries and the latest update times) are obtained through PyGithub using the project title. When I ...
Grekys's user avatar
  • 41
0 votes
1 answer
331 views

I have the following Python function to upload a file to github repository. def upload_to_github(github_token: str, source_file: str, destination_folder: str, ...
user3848207's user avatar
  • 5,317
0 votes
1 answer
120 views

have the following code: from github import Github ... g = github(token) query = f'org:{org_name} author:{username} since=2021-10-19T00:00:00Z' commits = g.search_commits(query, sort='author-date', ...
Darren Oakey's user avatar
  • 3,724
0 votes
1 answer
73 views

I have two csv files that update on a regular basis that supply data to Render for a dashboard. The entire process is automated except for pushing the new information to github, which I've been doing ...
kqd's user avatar
  • 97
1 vote
1 answer
1k views

I am using pyGithub to go through the files in the Github repository. The problem is, with this code my_code.get_contents(""), it goes through each and every file in all the folders and ...
nikhil's user avatar
  • 1,764
0 votes
1 answer
55 views

I want to download files from my private repository using python. What should I do? I tried something like this, but it doesn't work. I also allowed everything in the token for testing, I get error ...
Teccno's user avatar
  • 1
1 vote
0 answers
321 views

Background I am using a fork of the upstream repository where I created my own branch. I can commit to this branch and then create a pull request to the upstream. Committing again to the fork will ...
TheAlchemyst.1's user avatar
0 votes
3 answers
856 views

I believe the recommended method to get the contents of a large file stored on GitHub is to use REST API. For the files which size is 1MB-100MB, it's only possible to get raw contents (in string ...
Yulia V's user avatar
  • 3,567
0 votes
0 answers
278 views

I have a code which is working fine in my local but not on github actions. token = "some-token" repo_name = "customer-sandbox/some-repo" # org/repo format g = Github(token) repo = ...
Underoos's user avatar
  • 5,276
0 votes
2 answers
672 views

Upd: solved, see the comments below. When I try to read the contents of some pdf files I get an empty string. I have noticed that this happens to pdf files which encoding is none, and it works fine ...
Yulia V's user avatar
  • 3,567
0 votes
0 answers
67 views

I am trying to use PyGithub to access GitHub REST API to search repos. Since, API has strict rate limits, I want to filter out as many repos possible during the search. Before, writing the script in ...
akalanka's user avatar
  • 617
0 votes
1 answer
2k views

I want to try PyGitHub a Python library to access the GitHub REST API. python imterpreter: anaconda python 3.10 the first step, I install the command pip install PyGithub after that, I try to follow ...
Bill's user avatar
  • 11
3 votes
0 answers
564 views

I'm trying to fetch projects from a github repo using PyGithub 1.58.1. I created those projects manually in browser and I can see them.  But when I see repo.get_projects().totalCount, it's giving 0.  ...
Underoos's user avatar
  • 5,276
0 votes
2 answers
1k views

I have this very simple code using PyGithub from github import Github g = Github('<offuscated token>') repo = g.get_repo("telefonicaid/fiware-orion") repo.get_git_tag("3.8.0"...
fgalan's user avatar
  • 12.4k
1 vote
0 answers
56 views

I am receiving an error message of AttributeError when attempting to call a repo and its actions. This is my current code: from github import Github #Authenticate with GitHub g = Github("<...
Jayy Griff's user avatar
1 vote
0 answers
104 views

Hello so I am receiving this error BadCredentialsException: 401 {"message": "Bad credentials", "documentation_url": "https://docs.github.com/rest"} when ...
Jayy Griff's user avatar
1 vote
1 answer
2k views

I was reading over PyGitHub's documentation in: https://pygithub.readthedocs.io/en/latest/github_objects/Branch.html and found some interesting methods that I thought might help First I made sure that ...
DevopitionBro's user avatar
0 votes
1 answer
370 views

I have a github directory called "latviadebate". It looks like this: $ main . ├── index.html ├── style.css ├── images │ └── image1.png │ └── image2.png ├── pages │ └── 20-03-...
Chur-Ka Han's user avatar
0 votes
1 answer
1k views

I developed a script which predicts some values and saves them into the predictions.csv file using github actions. I then need to update the predictions.csv file on github, because i need to query it ...
Mark Müller's user avatar
1 vote
1 answer
598 views

How can I create a new branch off the master and check out the branch? The documentation at https://pygithub.readthedocs.io/en/latest/ does not show how to do this. Thanks a lot!!
Kay's user avatar
  • 1,595
1 vote
0 answers
143 views

I am trying to create a release and upload all files with a specific ending as an asset. My code is as follows: # This uploads all apkg files in the current directory to a release on GitHub. import ...
Pux's user avatar
  • 587
2 votes
0 answers
757 views

I would like to print all users in my organization in GitHub using PyGitHub. The below snippet works, however it returns a PaginatedList: python3 -c 'import os; from github import Github;g = Github(os....
mazix's user avatar
  • 2,630
1 vote
1 answer
320 views

I am trying to test with my code by mocking the PyGithub library. I want to create a repository for an organization. So first I need to get it and on the "Organization" returned object, I ...
Sparkmuse's user avatar
0 votes
1 answer
227 views

The following accesses the data from a text file on git hub. repoName = 'repo_url' filePath = 'file.txt' from github import Github g = Github(TOKEN) repo = g.get_repo(repoName) file = repo....
Spatial Digger's user avatar
2 votes
1 answer
4k views

I am looking for a way to extract GitHub repositories containing files with a certain code string. I can do manually using the GitHub search bar. For instance, if I'm looking for the usages of the ...
desert_ranger's user avatar
0 votes
1 answer
1k views

from github import Github access_token = "MYACCESS_TOKEN" g=Github(access_token, retry=20) repo = g.get_repo("pygit/git") print(repo.name) branches = repo.get_branches() for ...
MLS Mahesh's user avatar
0 votes
1 answer
250 views

I am trying to edit an already created gist using the pygithub library but I have been unable to do so thus far. import github.InputFileContent from github import Github g = Github("priv key&...
Boaztheostrich's user avatar
0 votes
0 answers
310 views

I just want to read a CSV file from a Github repo with PyGithub. from github import Github g = Github(token) repo = g.get_repo("user/example") contents = repo.get_contents("h.csv")...
carlosnev's user avatar
0 votes
1 answer
952 views

from github import Github import sys import requests import subprocess from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(...
Deepak Rohilla's user avatar
0 votes
1 answer
305 views

I’m using a lambda function to deploy code to GitHub to a forked repository with the use of Pygithub. The forked repo will create a pr to the upstream repo where changes will be reviewed. Is there a ...
papaya's user avatar
  • 21
0 votes
1 answer
364 views

I am using PyGithub to run tests on every pull request in a repository. I'd like to only run tests on pull requests that have passed my CI. Is there a way to query the results of the CI in Python? For ...
Yaakov Goldsmith's user avatar
3 votes
1 answer
3k views

Corresponding to the official DOC, I prepare the following URL: https://api.github.com/repos/gooddata/gooddata-python-sdk/pulls?per_page=10&page=1&sort=updated&direction=asc&state=all&...
Jan Soubusta's user avatar
0 votes
1 answer
677 views

I would like to know how can one check that public git repository is updated or not (if their are new commits) using python. Help in this regard would be appreciated.
iq tech's user avatar
  • 99
0 votes
0 answers
121 views

I am trying to write a script to update the contents of a file in a GitHub repo. I have a File.txt that has the required data. Here's the code I've written from github import Github g = Github(...
Salmaan Ali's user avatar
1 vote
2 answers
701 views

I have the problem that I want to update/overwrite my local folder with a Repository, but I cant find information about how I can do that with Python. When I am cloning it I have to have a empty ...
Lars Kager's user avatar
2 votes
1 answer
319 views

I've written this code to change the default branch from "master" to "release". from github import Github g = Github("github token", verify=False, base_url="url to ...
Salmaan Ali's user avatar
4 votes
2 answers
2k views

I want to upload an image file to my Github Repository using Pygithub. from github import Github g=Github("My Git Token") repo=g.get_repo("My Repo") content=repo.get_contents(&...
Kshitij_Jha_7's user avatar

1
2 3 4 5