github-api

Github v3 API get all organizations more than 100

限于喜欢 提交于 2019-12-12 14:29:55
问题 I am trying to get all organization items through http://host/api/v3/organizations?page=2&per_page=100 The default size seems like 30, and 100 seems like the max limit per request. But above link still only returns the first 100 items, i.e, not 101-200th I also tried http:host//api/v3/organizations?page=2 No matter which page I set, it only returns the first 30 items. How can I get the entire list of organization items please? Please help. Appreciate. 回答1: From Github API reference for

How to download Github repositories via GraphQL API search?

不打扰是莪最后的温柔 提交于 2019-12-12 11:25:47
问题 I want to make some data researches and want to download repositories content from the search results with Github GraphQL API. What I already found is how to make simple search query, but the question is: How to download repositories content from the search results? Here is my current code that returns repositories name and description (try to run here): { search(query: "example", type: REPOSITORY, first: 20) { repositoryCount edges { node { ... on Repository { name descriptionHTML } } } } }

GET pull request merge commit sha from pull request number using github api

折月煮酒 提交于 2019-12-12 10:42:55
问题 I'm trying to use the github api (via githubot https://github.com/iangreenleaf/githubot) to GET a pull request merge commit sha from the pull request number. I'm able to get the proper response (example here under "get a single pull request": https://developer.github.com/v3/pulls/) but the merge_commit_sha gives me this error: fatal: bad object 304fc816f33f808080c9c87895eea2d66081d373 When I compare the 2 pages on github I'm seeing both the merge_commit_sha from the commit page but I'm seeing

github api to compare commits, response status is diverged

蹲街弑〆低调 提交于 2019-12-12 10:04:48
问题 When configuring jenkins, I want to detect feature branches whether they have merging conflicts, so I use github api v3 to test on 2 intentional conflicted branches. After merge branch1 to master, I compared branch2(b2) like this: curl -i https://api.github.com/repos/hao1987/myself/compare/hao1987:master...hao1987:b2 and it returns a long json which has an attribute: "status": "diverged" I wonder if that means conflict, and where I can try types of "status" 回答1: This isn't documented (sorry!)

How to call the github API form HttpsURLConnection in java

眉间皱痕 提交于 2019-12-12 03:47:16
问题 I need to change my branch named testingProtectedBranch1 as a protected branch with providing the following parameters on required_status_check : include_admins= true, strict= true, context= continuous-integration/travis-ci restrictions: null required_pull_request_reviews: include_admins=false here is my code and the access token ( the variable token ) is provided by the user at the runtime. public void setMasterBranchAsProtected() throws Exception{ String URLForCallingTheBranchAPI="https:/

List forks with Github API v3

百般思念 提交于 2019-12-12 00:53:49
问题 I'm trying to list all forks of a repository with the Github API (with a valid personal access token): https://api.github.com/repos/nickperkinslondon/angular-bootstrap-nav-tree/forks/ but it returns a not found error: documentation_url: "https://developer.github.com/v3", message: "Not Found" 回答1: Try removing the trailing slash: https://api.github.com/repos/nickperkinslondon/angular-bootstrap-nav-tree/forks 来源: https://stackoverflow.com/questions/31516921/list-forks-with-github-api-v3

Trouble Executing GIT commands from outside bash shell (windows)

Deadly 提交于 2019-12-11 23:43:51
问题 I'm using finalbuilder to execute GIT commands without success. FinalBuilder docs suggest setting the env variable HOME to %USERPROFILE% which I have done. I can execute git clone commands successfully from the git bash shell but not from inside finalbuilder with their git action. Leaving finalbuilder out of the picture, in windows, how can I execute a git command from outside of bash? Now, my error is simply a timeout. no error, just timeout. Thanks 回答1: Assuming you mean Git for Windows and

Github API update a file in PHP

浪子不回头ぞ 提交于 2019-12-11 22:04:30
问题 I'm trying to get use to github API , and trying to update a file from my website (http://developer.github.com/v3/repos/contents/) I could manage to get the last commit SHA of the file that I want to update, and everything is setup. I followed the document on github library. When the code is run, it prints out everything except the response from the curl call. I tried all possible fixes that I could: use other ways for PUT method, check whether curl is enabled or not, change different type of

GitHub API - Different number of results for jq filtered response

跟風遠走 提交于 2019-12-11 20:39:50
问题 I am trying to use the GitHub API to make a list of well documented, open source Java libraries. To do so, I went through the GitHub API documentation and made this simple curl. curl -G https://api.github.com/search/repositories?q=language:Java+stars:%3E=500+library+java+in:readme > output1.txt The output of this is a giant txt file, containing information about all of the repositories found. In this example, there was a total of 736 matches. However, the file from the command above is quite

Get user events with Github API and Octokit

冷暖自知 提交于 2019-12-11 19:53:15
问题 I'm trying to make a simple call to retrieve user events on github through octokit. According to the docs I create new client and visit the user events endpoint. client = Octokit::Client.new(access_token: my_token) user = client.user Up to here it works fine, now I continue with events = user.events => nil Alternatively, when I do client = Octokit::Client.new(access_token: my_token, api_endpoint: 'users/:user/events') I get #<Octokit::Client:0x007f9a78ac04f8... but how to get list of events