github-api

GitHub v3 API: How to create initial commit for my shiny new repository?

拟墨画扇 提交于 2019-12-21 10:24:09
问题 GitHub API docs says: Git DB API functions will return a 409 if the git repo for a Repository is empty or unavailable. My POST on $repo/git/trees returns 409 indeed. How do I create initial commit in the repository then? Do I have to force user to commit some useless junk manually, just for the sake of creating root commit? 回答1: I emailed github support with the same issue and here is their response: From: Rick (GitHub Staff) Subject: Creating an initial commit using the v3 API Currently, you

Using GitHub list-issues-for-a-repository API

 ̄綄美尐妖づ 提交于 2019-12-21 09:25:27
问题 When you go to GitHub, under Issues, it pulls up all the open issues as an HTML page. We'd like to implement a dashboard showing all the issues in a repository, grouped by labels, including those issues which are not correctly labelled. This is the corresponding list-issues-for-a-repository API. While I was initially using jQuery and Javascript, am now using PHP for a proof-of-concept because its built-in session handling lets me use the same page to login, have GitHub authenticate & callback

GitHub v3 API: Get full commit list for large comparison

两盒软妹~` 提交于 2019-12-21 07:31:20
问题 I'm trying to use the GitHub v3 API to get the full list of commits between two SHAs, using the comparison API ( /repos/:owner/:repo/compare/:base...:head ), but it only returns the first 250 commits and I need to get all of them. I found the API pagination docs, but the compare API doesn't appear to support either the page or per_page parameters, either with counts or SHAs ( EDIT : the last_sha parameter doesn't work either). And unlike the commits API, the compare API doesn't seem to return

GitHub v3 API: Get full commit list for large comparison

北城余情 提交于 2019-12-21 07:31:09
问题 I'm trying to use the GitHub v3 API to get the full list of commits between two SHAs, using the comparison API ( /repos/:owner/:repo/compare/:base...:head ), but it only returns the first 250 commits and I need to get all of them. I found the API pagination docs, but the compare API doesn't appear to support either the page or per_page parameters, either with counts or SHAs ( EDIT : the last_sha parameter doesn't work either). And unlike the commits API, the compare API doesn't seem to return

Create new gist with Github API v3 using curl

跟風遠走 提交于 2019-12-21 05:04:26
问题 After fighting for quite some time for posting a private gist to Github using their API V3 I almost gave up. Almost. May be some one have also faced similar problem or know what might be the reasoning of the following behavior: Right now the curl command looks like following: curl -H "Authorization: bearer MY_AUTHORIZATION_TOKE" -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"public":false,"files":{"test.txt":{"content":"String file contents"}}}' https://api

How can I find how many of my GitHub pull requests have been accepted?

浪尽此生 提交于 2019-12-21 05:00:05
问题 Is there a way to find out the acceptance rate of one's GitHub PR's, probably using the API? While at that, it would be interesting to find out how many of the issues I reported have been closed vs. are still open, across all repos. 回答1: I don't see a way to get that information directly. That leaves you with the GitHub Issues Events API. With that, you can list all the events of a repo: GET /repos/:owner/:repo/issues/events https://api.github.com/repos/user/reponame/issues/events And filter

Automatically merge verified and tested GitHub Pull Requests

戏子无情 提交于 2019-12-21 04:37:11
问题 I'd like to automatically (i.e. from Jenkins) merge a GitHub pull request that has been approved by a person and has been tested successfully; in other words, when all THREE of these checkmarks are green: Is this possible? I haven't found any documentation on an API for GitHub's new "changes approved" code review functionality. 回答1: There is a new PullRequestReviewEvent webhook that is triggered when a review is submitted in a non-pending state. The body of the webhook contains the ["review"]

Github API v3 doesn't show all user repositories

≯℡__Kan透↙ 提交于 2019-12-20 10:27:19
问题 If i type this command: $ curl https://api.github.com/users/KiCad/repos | grep full_name I expect that it will return all KiCad repositories, but it returns: "full_name": "KiCad/Air_Coils_SML_NEOSID.pretty", "full_name": "KiCad/Buzzers_Beepers.pretty", "full_name": "KiCad/Capacitors_Elko_ThroughHole.pretty", "full_name": "KiCad/Capacitors_SMD.pretty", "full_name": "KiCad/Capacitors_Tantalum_SMD.pretty", "full_name": "KiCad/Capacitors_ThroughHole.pretty", "full_name": "KiCad/Choke_Axial

GitHub CLI clients

老子叫甜甜 提交于 2019-12-20 10:01:08
问题 I'd like to use GitHub more from the command line and less through the web. Of course, everything related to Git repos can be done through the Git client. But I'd like to also do GitHub-specific things like creating forks or managing pull requests. Given that GitHub seems to have a pretty comprehensive API with libraries in many languages, I was wondering if there are any good command-line clients out there to interact with GitHub? 回答1: Have you had a look at hub or the official gh? 回答2: For

GitHub CLI clients

喜欢而已 提交于 2019-12-20 10:00:16
问题 I'd like to use GitHub more from the command line and less through the web. Of course, everything related to Git repos can be done through the Git client. But I'd like to also do GitHub-specific things like creating forks or managing pull requests. Given that GitHub seems to have a pretty comprehensive API with libraries in many languages, I was wondering if there are any good command-line clients out there to interact with GitHub? 回答1: Have you had a look at hub or the official gh? 回答2: For