{"action":"created","issue":{"url":"https://api.github.com/repos/jcabi/jcabi-github/issues/1053","labels_url":"https://api.github.com/repos/jcabi/jcabi-github/issues/1053/labels{/name}","comments_url":"https://api.github.com/repos/jcabi/jcabi-github/issues/1053/comments","events_url":"https://api.github.com/repos/jcabi/jcabi-github/issues/1053/events","html_url":"https://github.com/jcabi/jcabi-github/pull/1053","id":68141824,"number":1053,"title":"Add possibility to merge pull requests with SHA","user":{"login":"sonOfRa","id":1269520,"avatar_url":"https://avatars.githubusercontent.com/u/1269520?v=3","gravatar_id":"","url":"https://api.github.com/users/sonOfRa","html_url":"https://github.com/sonOfRa","followers_url":"https://api.github.com/users/sonOfRa/followers","following_url":"https://api.github.com/users/sonOfRa/following{/other_user}","gists_url":"https://api.github.com/users/sonOfRa/gists{/gist_id}","starred_url":"https://api.github.com/users/sonOfRa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonOfRa/subscriptions","organizations_url":"https://api.github.com/users/sonOfRa/orgs","repos_url":"https://api.github.com/users/sonOfRa/repos","events_url":"https://api.github.com/users/sonOfRa/events{/privacy}","received_events_url":"https://api.github.com/users/sonOfRa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-13T16:47:20Z","updated_at":"2015-04-14T07:56:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jcabi/jcabi-github/pulls/1053","html_url":"https://github.com/jcabi/jcabi-github/pull/1053","diff_url":"https://github.com/jcabi/jcabi-github/pull/1053.diff","patch_url":"https://github.com/jcabi/jcabi-github/pull/1053.patch"},"body":"This feature allows to merge a Pull Request giving a SHA-Hash of the\r\nPull Request's head. If the given SHA doesn't match the actual head of\r\nthe Pull Request on GitHub, the merge fails, and BAD_HEAD is returned.\r\nInstead of throwing an exception if the merge fails, NOT_MERGEABLE is\r\nreturned. On a successful merge, SUCCESS is returned. IOException is\r\nthrown if any other unexpected status is returned by GitHub.\r\n\r\nI tested this locally with a small program: https://gist.github.com/sonOfRa/40fe32d9f06cb1719d62. The repo I tested against is here: https://github.com/sonOfRa/jcabi-test\r\n\r\nPR 1 got merged and printed SUCCESS, PR 2 and PR 3 both failed, each time with the error I expected (NOT_MERGEABLE and BAD_HEAD respectively)."},"comment":{"url":"https://api.github.com/repos/jcabi/jcabi-github/issues/comments/92681441","html_url":"https://github.com/jcabi/jcabi-github/pull/1053#issuecomment-92681441","issue_url":"https://api.github.com/repos/jcabi/jcabi-github/issues/1053","id":92681441,"user":{"login":"dmarkov","id":5993843,"avatar_url":"https://avatars.githubusercontent.com/u/5993843?v=3","gravatar_id":"","url":"https://api.github.com/users/dmarkov","html_url":"https://github.com/dmarkov","followers_url":"https://api.github.com/users/dmarkov/followers","following_url":"https://api.github.com/users/dmarkov/following{/other_user}","gists_url":"https://api.github.com/users/dmarkov/gists{/gist_id}","starred_url":"https://api.github.com/users/dmarkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmarkov/subscriptions","organizations_url":"https://api.github.com/users/dmarkov/orgs","repos_url":"https://api.github.com/users/dmarkov/repos","events_url":"https://api.github.com/users/dmarkov/events{/privacy}","received_events_url":"https://api.github.com/users/dmarkov/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T07:56:32Z","updated_at":"2015-04-14T07:56:32Z","body":"@sonofra Many thanks for the PR, let me find a reviewer for it"}}