{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/github-integration-plugin/issues/71","repository_url":"https://api.github.com/repos/jenkinsci/github-integration-plugin","labels_url":"https://api.github.com/repos/jenkinsci/github-integration-plugin/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/github-integration-plugin/issues/71/comments","events_url":"https://api.github.com/repos/jenkinsci/github-integration-plugin/issues/71/events","html_url":"https://github.com/jenkinsci/github-integration-plugin/pull/71","id":146501376,"number":71,"title":"Add pipeline step to update commit status of pull request","user":{"login":"onecloud-sean","id":6462037,"avatar_url":"https://avatars.githubusercontent.com/u/6462037?v=3","gravatar_id":"","url":"https://api.github.com/users/onecloud-sean","html_url":"https://github.com/onecloud-sean","followers_url":"https://api.github.com/users/onecloud-sean/followers","following_url":"https://api.github.com/users/onecloud-sean/following{/other_user}","gists_url":"https://api.github.com/users/onecloud-sean/gists{/gist_id}","starred_url":"https://api.github.com/users/onecloud-sean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onecloud-sean/subscriptions","organizations_url":"https://api.github.com/users/onecloud-sean/orgs","repos_url":"https://api.github.com/users/onecloud-sean/repos","events_url":"https://api.github.com/users/onecloud-sean/events{/privacy}","received_events_url":"https://api.github.com/users/onecloud-sean/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-04-07T03:37:14Z","updated_at":"2016-04-21T17:00:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/github-integration-plugin/pulls/71","html_url":"https://github.com/jenkinsci/github-integration-plugin/pull/71","diff_url":"https://github.com/jenkinsci/github-integration-plugin/pull/71.diff","patch_url":"https://github.com/jenkinsci/github-integration-plugin/pull/71.patch"},"body":"This is a far simpler alternative to PR #65. It introduces a new groovy step that can be used in a pipeline/workflow project (https://github.com/jenkinsci/workflow-plugin). \r\n\r\nThe step can be used anywhere in the DSL (at the top level, inside a `node` block, etc...) but it does require that the project be set up and configured with the Pull Request Trigger.\r\n\r\nFor a simplified example, you can do something like this:\r\n```groovy\r\n\r\npullRequestSetCommitStatus state: 'PENDING', context: 'mytests', message: 'Build queued'\r\n\r\ntry {\r\n    node {\r\n        pullRequestSetCommitStatus state: 'PENDING', context: 'mytests', message: 'Tests running'\r\n        // .. do the build and/or test stuff...\r\n        pullRequestSetCommitStatus state: 'SUCCESS', context: 'mytests', message: 'Tests passed'\r\n    }\r\n}\r\ncatch (Exception e) {\r\n    pullRequestSetCommitStatus state: 'FAILURE', context: 'mytests', message: 'Some tests failed'\r\n    throw e\r\n}\r\n```\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/jenkinsci/github-integration-plugin/71)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/jenkinsci/github-integration-plugin/issues/comments/213016515","html_url":"https://github.com/jenkinsci/github-integration-plugin/pull/71#issuecomment-213016515","issue_url":"https://api.github.com/repos/jenkinsci/github-integration-plugin/issues/71","id":213016515,"user":{"login":"KostyaSha","id":231611,"avatar_url":"https://avatars.githubusercontent.com/u/231611?v=3","gravatar_id":"","url":"https://api.github.com/users/KostyaSha","html_url":"https://github.com/KostyaSha","followers_url":"https://api.github.com/users/KostyaSha/followers","following_url":"https://api.github.com/users/KostyaSha/following{/other_user}","gists_url":"https://api.github.com/users/KostyaSha/gists{/gist_id}","starred_url":"https://api.github.com/users/KostyaSha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KostyaSha/subscriptions","organizations_url":"https://api.github.com/users/KostyaSha/orgs","repos_url":"https://api.github.com/users/KostyaSha/repos","events_url":"https://api.github.com/users/KostyaSha/events{/privacy}","received_events_url":"https://api.github.com/users/KostyaSha/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T17:00:17Z","updated_at":"2016-04-21T17:00:17Z","body":"One more headache is matrix jobs that has issues with statuses #53 "}}