github-api

How to use GitHub V3 API to get commit count for a repo?

一曲冷凌霜 提交于 2019-12-17 18:03:07
问题 I am trying to count commits for many large github repos using the API, so I would like to avoid getting the entire list of commits (this way as an example: api.github.com/repos/jasonrudolph/keyboard/commits ) and counting them. If I had the hash of the first (initial) commit , I could use this technique to compare the first commit to the latest and it happily reports the total_commits in between (so I'd need to add one) that way. Unfortunately, I cannot see how to elegantly get the first

How to create a commit and push into repo with GitHub API v3?

血红的双手。 提交于 2019-12-17 15:44:25
问题 I want to create a repository and Commit a few files to it via any Python package. How do I do? I do not understand how to add files for commit. 回答1: You can see if the new update GitHub CRUD API (May 2013) can help The repository contents API has allowed reading files for a while. Now you can easily commit changes to single files, just like you can in the web UI. Starting today, these methods are available to you: File Create File Update File Delete 回答2: Github provides a Git database API

Setting up an Github Commit RSS feed

陌路散爱 提交于 2019-12-17 15:04:52
问题 I am trying to have my github commits as an RSS feed but so far I have not managed to figure it out. I know that a private feed is available with the following syntax: https://github.com/username.atom?token=token But this the users activity feed. I would like a commit feed of one of my projects. Thanks in advance! Perfect, thank you!! this was the final syntax: https://github.com/username/repository_name/commits/branch_name.atom?login=login&token=token. Still cant view commits on all branches

How to delete a GitHub repo using the API

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-17 10:43:11
问题 I am getting familiar with the GitHub API http://developer.github.com/v3/ I am trying things out both with RESTClient plugin for Firefox and with curl command line tool. I have found out how to create a repo with the API, however I can't seem to delete it with the API. According to the help here: http://developer.github.com/v3/repos/#delete-a-repository I must send a DELETE request like this: curl -X DELETE -H 'Authorization: token xxx' https://api.github.com/repos/:owner/:repo The help does

How to retrieve the list of all github repositories of a person?

穿精又带淫゛_ 提交于 2019-12-17 10:15:36
问题 We are working on a project where we need to display all the projects of a person in his repository on GitHub account. Can anyone suggest, how can I display the names of all the git repositories of a particular person using his git-user name? 回答1: You can use the github api for this. Hitting https://api.github.com/users/USERNAME/repos will list public repositories for the user USERNAME . 回答2: Use the Github API: /users/:user/repos This will give you all the user's public repositories. If you

Github API: Retrieve all commits for all branches for a repo

て烟熏妆下的殇ゞ 提交于 2019-12-17 08:16:08
问题 According to the V2 documentation, you can list all commits for a branch with: commits/list/:user_id/:repository/:branch I am not seeing the same functionality in the V3 documentation. I would like to collect all branches using something like: https://api.github.com/repos/:user/:repo/branches And then iterate through them, pulling all commits for each. Alternatively, if there's a way to pull all commits for all branches for a repo directly, that would work just as well if not better. Any

How can I subscribe to a Github users' new stars?

时光毁灭记忆、已成空白 提交于 2019-12-14 03:56:57
问题 I am looking into creating a service that tweets whenever a user stars a Github repository. The Github Webhooks API would be ideal, but it only supports webhooks for orgs and repos, not users. https://api.github.com/users/metaraine/watched provides exactly the information needed, but it is static. I want to get newly starred repos without having to poll the /watched endpoint. Any suggestions? 回答1: I want to get newly starred repos without having to poll the /watched endpoint. Any suggestions?

Cannot get repository contents as .zip file (zipball) in Octokit.net

萝らか妹 提交于 2019-12-14 03:53:10
问题 I am using Octokit.net version 0.9.0 (GitHub API for .NET) for getting zip contents of few repositories. I already have the list of repositories I need but I am having trouble with getting the the content of the repositories as .zip files (called zipball) What I've tried so far // ... client = new Client(...); // some authentication logic... // some other queries to GitHub that work correctly var url = "https://api.github.com/repos/SomeUser/SomeRepo/zipball"; var response = await this.client

Python push files to Github remote repo without local working directory

ε祈祈猫儿з 提交于 2019-12-12 20:03:11
问题 I am working on a Python based web application for collaborative xml/document editing, and one requirement from the client is that users should be able to push the files they created (and saved on the server) directly to a Github remote repo, without the need of ever creating a local clone on the server (i.e., no local working directory or tracking of any sort). In GUI terms, this would correspond to going to Github website and manually add the file to the remote repo by clicking the "Upload

Github API v3 - Fetch diff of specific commit

怎甘沉沦 提交于 2019-12-12 16:36:22
问题 I'm trying to figure out how to fetch the diff from a specific commit on Github. (Basically, just a series of individual file diffs, associated with a particular commit). Some of the links on this question helped me figure out how to pull the contents of a given file in a repo, but I can't figure out how to pull the file for a particular commit. OR, more to the point, how to pull the whole diff (pretty much as displayed when looking at a particular commit on Github). Is there an easy way I'm