github-api

How do we know a pull request is approved or rejected using API in github?

谁都会走 提交于 2019-12-19 03:58:32
问题 I would like to know if there is an function in the Github API which would return the status of a pull request whether its accepted or rejected. Does such a function exist? 回答1: You can get a single PR and check it's state and merged properties. If it's merged, then it's accepted . If it's closed and not merged it may be rejected . In fact it may be not rejected but closed by a creator. I'm not sure if it's possible to check if it was closed by another user ( rejected ) or by it's creator (

Github Pull Request Checks

坚强是说给别人听的谎言 提交于 2019-12-19 03:38:12
问题 Is it possible to create a Github Check for pull requests? I know there are WebHooks, but is there a way to also hook into the UI? Aim: Pull Request made. Perform validation and update pull request if valid. Pull Request merged. Create web call to URL. Update Github issue with confirmation. What's the best way to do this? Is it only via Web Hooks, API calls and getting write oAuth credentials? 回答1: I know there are WebHooks, but is there a way to also hook into the UI? The recommended way of

Github API: how to find the branches of a pull request?

独自空忆成欢 提交于 2019-12-18 12:56:15
问题 The Github API (v3) allows you to get a listing of pull requests, and get more details on an individual pull request. What I can't seem to find is the name of the branch the pull request is coming from and the branch the pull request is suggesting the code be merged into. Using the Github API how do you determine the branches involved in a pull request? 回答1: Access a Pull Request URL. Let's use https://api.github.com/repos/github/gitignore/pulls/566 as an example. Parse the JSON object. A

Github - remove issues entered in error

送分小仙女□ 提交于 2019-12-18 12:56:15
问题 Dozens of issues have been entered into my project on github that have no place there. Some Einstein ran a script and created all these nonsensical issues through the api. Nothing is linked to these issues. Surely there is someway I can delete them, but I can't seem to find it in the docs. 回答1: There is no way to actually delete the issues. What you can do, to indicate that this was a spam attack, is create a new label. You can then use the API to edit each issue to be closed and labeled with

Create comment on pull request

喜夏-厌秋 提交于 2019-12-18 11:41:44
问题 GitHub's comment API seems to allow you to create comments on a pull request, but only if you supply a specific line number in the diff to comment on. Is there a way to create a comment on the pull request as a whole, the equivalent of typing at the bottom of the pull request screen in GitHub's web interface? 回答1: Yes, it is possible. The section of the API docs you are referencing relates to line comments (comments on specific lines of the commits in the pull req), and the docs say: Pull

Get GitHub avatar from email or name

只谈情不闲聊 提交于 2019-12-18 10:16:21
问题 I'm trying to get the GitHub user picture (avatar) from users of GitHub. I've found these API: https://avatars.githubusercontent.com/<username> https://avatars.githubusercontent.com/u/<userid> But I can't find a way to get the avatar from the user email or the user display name. I can't find documentation about that. Is there some similar URL API to get what I'm looking for? 回答1: You can append .png to the URL for the User's profile to get redirected to their avatar. You can add the query

GitHub Api download zip or tarball link

末鹿安然 提交于 2019-12-18 10:08:09
问题 There was a good link here about how the zip/tarball string is created When I download a zip from github, what is the hex string at the end of the file name represent? But I'm looking at the GitHub APIv3 and I was curious if I'm missing something. Is there a way to get the zip/tarball link via an API call? If not, is there a way I can build that string without using the git binary or library? Meaning, can I use various API calls to pull out th data a need and assemble to URL I need? I know

How to create Organization name through Github API instead of creating manually?

喜你入骨 提交于 2019-12-18 07:14:34
问题 I am trying to use github api to create organization and repositories instead of creating them manually. I was looking at this site which talks about how to create repositories under a particular organization. My github instance url is like this - https://github.host.com And I want my repository to be like this after getting created - https://github.host.com/Mobile/CustomerSystem Here Mobile is the organization name and CustomerSystem is the repository name. In my case, I don't have Mobile

GitHub Search API only return 30 results

走远了吗. 提交于 2019-12-18 05:43:46
问题 https://api.github.com/search/issues?q=stress+test+label:bug+language:python+state:closed the above query is suppose to return 76 results, and when I try to run it, it only returns 30. I guess GitHub return results in portions when it is over 30. Any idea how I can get the rest of the results? 回答1: You need to use page parameter, e.g. for next 30 page = 2 https://api.github.com/search/issues?q=stress+test+label:bug+language:python+state:closed&page=2 You can also use per_page parameter to

github search limit results

独自空忆成欢 提交于 2019-12-18 03:38:32
问题 I need to do a very large search on Github for a statistic in my thesis. For example, I need to explore a large number of Android projects on GitHub, but the site limits the search result to 1000 (ex. https://github.com/search?l=java&q=onCreate&ref=searchresults&type=Code&utf8=%E2%9C%93). Also using the Java GitHub API I tried the library org.eclipse.egit.github.core.client.GitHubClient using the method GitHubClient.searchRepositories() but even there the number of results is limited. Does