How do you make a django field reference to a python class?

I am working on a project to expand a testing suite that my company uses. One of this things that was asked of me was to link the website to our Github source for code so that the dev team could...

ImportError: No module named github3 on ubuntu

Working with : Ubuntu 13.10 installed with python Python 2.7.5+. [GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import github3 Traceback (most...

How to create an issue comment on a pull request?

According to this question a PR is just an issue with some things on top. How to get the associated issue id? I just saw issue_url as attribute for the pull request object. Also, PR has the...

Is there an easy way of reverting an already merged Pull Request using the API?

github provides a "Revert" button in it's web interface, which allow us to revert a pull request that was already merged. This always involves, to the best of my knowledge, creating a new pull...

"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....

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...

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...

GitHub API get issues description using Python

The task: (using GitHub API) get all closed milestones for a given repo get all issues for that milestone for every issue get it's description finally, using Markdown for example, create a page...

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...

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 =...

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...

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...

Does PyGithub have a way to make conditional calls?

I notice that the GitHub API has an eTag which can be used to return changes since the tag. github3.py has a way to do this, but I prefer PyGithub because it feels more intuitive. Does this...

Recommended way to install Ansible modules from PyPI

When creating new projects in Python, the recommended way to install dependencies from PyPI is to use virtualenv or venv, instead of installing the modules globally. I want to install the...

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() ...

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...

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...

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...

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.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 =...

python requests library to github api - inconsistent responses to same url

Appreciate any help - using Django and Github API for the first time together. I have a simple url that I get from an api request from a repo's pull requests. I'm looping through them getting to...

Traceback Error: Lookup Error: unknown encoding charmap

I am following along with Justin Seitz book "Black Hat Python." For this chapter we are writing a Trojan using GitHub for a command and control and using github3.py to interact with GitHub. The...

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...

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.

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.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,...

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...

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...

How to get a file's latest update timestamp from Github API?

I'm using the github3.py Python package. I'm trying to get a file's latest update timestamp from Github API. So far I used the repo's file_content API (which uses Github's contents API ) to get...

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...