218 questions
0
votes
0
answers
63
views
GitHub API endpoint no longer returning results for referral sources
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 ...
0
votes
0
answers
160
views
Enable GitHub merge queue using rulesets/Branch Protection rules/PyGithub
We have a requirement to enable merge queue for 100's of our repositories, I went through lot of information on internet and found out that support to enable merge queue is only available via GitHub ...
0
votes
1
answer
53
views
How to unfollow someone using PyGitHub
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 ...
1
vote
1
answer
111
views
GitHub file search by name results differ from web when using API or pyGitHub
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 ...
1
vote
1
answer
247
views
Discrepancies Between GitHub API and Web Interface Search Results
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 ...
0
votes
0
answers
47
views
Can't push a mp4 file to github with PyGithub
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&...
0
votes
1
answer
165
views
How to get the default branch in PyGithub?
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&...
0
votes
0
answers
129
views
Multiple files into single commit using PyGithub
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'...
0
votes
0
answers
81
views
edit_protection() got an unexpected keyword argument
branch.edit_protection(
enforce_admins=desired_protection_settings["enforce_admins"],
required_linear_history=desired_protection_settings["...
4
votes
2
answers
595
views
Download github issue attachments from private repos
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 ...
1
vote
0
answers
106
views
How can I tell if my github branch has a Pull Request?
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 ...
0
votes
1
answer
715
views
How to get the status of a build on GithHub through PyGitHub
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 ...
2
votes
1
answer
170
views
Is there a way in Python GitHub library to check if the branch for which a PR has been raised is out-of-date from it's base branch or not?
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 ...
0
votes
1
answer
48
views
PyGitHub: Get avatar of user?
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 ...
0
votes
1
answer
383
views
Using PyGithub, how do I get the last known update time for a repository?
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 ...