github-api

libgit2sharp what is correct sha to supply to GitHub API merge pull-request?

青春壹個敷衍的年華 提交于 2019-12-11 03:46:31
问题 GitHub API requires merge pull-request to be submitted as PUT /repos/:owner/:repo/pulls/:number/merge with request body json { "commit_message": "blah", "sha": "{SHA that pull request head must match to allow merge}", } Following a commit, push, create PR, what libgit2sharp property supplies the correct sha ? For the current branch, it appears Branch.Tip.Sha is the correct value, but I'm receiving response error : { "message": "Head branch was modified. Review and try the merge again.",

GitHub API - how to get “amount of issues” to Google Sheets from private GitHub repo?

本小妞迷上赌 提交于 2019-12-11 03:23:46
问题 I'm trying to come to grips with the GitHub API. I've gotten a detailed list of issues from the API, by doing this: function myFunction() { var url = 'https://api.github.com/repos/repo/subrepo/issues'; var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); Logger.log(response); } but that just goes the console log - and does not seem to enable me to see how many issues there are. Is there a GitHub API method of getting the "total amount of open issues" or "closed issues"? I'm

How do i retrieve a user github repositories with Laravel socialite?

柔情痞子 提交于 2019-12-11 02:59:48
问题 Been using socialite for quite a while now and i'm wondering if there is any built-in method that allows me to retrieve a user repositories. I'm familiar with the list on method offered on laravel website. Any idea how to fetch the Repos given the user token ? 回答1: I found another to do that . Find the code below : In the callback function i added a function that uses curl to fetch repos public function handleProviderCallback() { $user = Socialite::driver('github')->user(); $this-

Github API - Get Branch of Tag

荒凉一梦 提交于 2019-12-11 02:29:46
问题 I am currently writing a system to automatically archive stable releases of a piece of sofwtare that we maintain. The source is maintained in GitHub, and I am using the v3 API to pull out each tag, check if it is present in our system, and if it is not archive it. The issue I am running into is that I would like to include additional information along with what I get back for the tag. Specifically, I would like to be able to include the branch that the commit for that tag was committed to. Is

How to search using GitHub API in private organizations

霸气de小男生 提交于 2019-12-11 02:20:07
问题 I have a private organization GitHub (enterprise) repository, e.g. github.mycompany.com . I want to search strings in code using the GitHub API. How do I search in mycompany -specific GitHub repositories? I tried the query below and received 404: curl -i -H "Authorization: token <token>" https://github.mycompany.com/api/v3/search/code?q=class It seems to be authenticating fine, since I tried curl -u <userName> and If I give the wrong password, I get an authentication error. If I give the

GitHub API limit exceeded: how to increase the rate limit in front-end apps

拜拜、爱过 提交于 2019-12-10 23:31:53
问题 After some HTTP requests to the GitHub API, it starts refusing the calls saying: API rate limit exceeded for xxx.xxx.xxx.xxx. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) Now, there is a way to increase the unauthenticated rate limit for OAuth applications which involves using the client secret . Of course we don't want to put or client secret on the public source code of a front-end app, as also the documentation

Get pull requests for private github repository via API

こ雲淡風輕ζ 提交于 2019-12-10 19:02:26
问题 I want to programmatically get a list of open pull requests for a specific private github repository - ours, as it turns out. I assume I can only do this via the github api (http://developer.github.com/) - feel free to tell me there's another way - but I can't figure out whether the API allows this, either. The given API calls seem to assume the target repository is public, which ours is not. I would have thought there would be a way to authenticate as a user of the given repository via ssh

github api returning 1 at the end of json. is this a mistake?

前提是你 提交于 2019-12-10 17:53:55
问题 using curl http://github.com/api/v2/json/user/show/username github's user api returns this: ...,"login":"myUsername","email":"myEmail@test.com"}}**1** why is there a 1 after the json? Is that a mistake on their part, or is that supposed to be used for something? <?php function getGithub($url="user/show/username") { $github = curl_init(); curl_setopt($github, CURLOPT_URL, "http://github.com/api/v2/json/". $url); return curl_exec($github); } trying to echo getGithub(); but since there's the 1

Add user to organization repository github API

孤街醉人 提交于 2019-12-10 17:08:05
问题 I'm trying to add multiple users to a team in a private group team using curl and the github API. However, something is off with my syntax and I'm not sure what it is. I've tried: curl --user "groupowner:password" -X PUT -d "" "https://api.github.com/orgs/ORGNAME/teams/TEAMNAME/members/USERNAMETOBEADDED/" The github documentation, e.g., here is helpful, but I'm missing something.Looking here it seems that another syntax may be possible. 回答1: Getting rid of the trailing slash and using the

How to get number of result pages for the data fetched from Github API for a request?

我们两清 提交于 2019-12-10 16:30:16
问题 I am not using CURL and only using jQuery, AJAX and JS for getting information from Github API. I am using a URL like this to get information about issues- https://api.github.com/repos/jquery/jquery/issues But the result comes in multiple pages since Github API uses pagination feature. When using CURL we get to know about the header information in which the number of result pages are also shown but I am not using CURL and directly requesting data from above API url using jQuery and AJAX so I