{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/bitbucket-build-status-notifier-plugin/issues/22","repository_url":"https://api.github.com/repos/jenkinsci/bitbucket-build-status-notifier-plugin","labels_url":"https://api.github.com/repos/jenkinsci/bitbucket-build-status-notifier-plugin/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/bitbucket-build-status-notifier-plugin/issues/22/comments","events_url":"https://api.github.com/repos/jenkinsci/bitbucket-build-status-notifier-plugin/issues/22/events","html_url":"https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/pull/22","id":158518491,"number":22,"title":"[WIP] step definition for pipeline plugin - first (bad) implementation","user":{"login":"trik","id":1615301,"avatar_url":"https://avatars.githubusercontent.com/u/1615301?v=3","gravatar_id":"","url":"https://api.github.com/users/trik","html_url":"https://github.com/trik","followers_url":"https://api.github.com/users/trik/followers","following_url":"https://api.github.com/users/trik/following{/other_user}","gists_url":"https://api.github.com/users/trik/gists{/gist_id}","starred_url":"https://api.github.com/users/trik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trik/subscriptions","organizations_url":"https://api.github.com/users/trik/orgs","repos_url":"https://api.github.com/users/trik/repos","events_url":"https://api.github.com/users/trik/events{/privacy}","received_events_url":"https://api.github.com/users/trik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jenkinsci/bitbucket-build-status-notifier-plugin/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-06-04T18:54:17Z","updated_at":"2016-06-22T07:24:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/bitbucket-build-status-notifier-plugin/pulls/22","html_url":"https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/pull/22","diff_url":"https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/pull/22.diff","patch_url":"https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/pull/22.patch"},"body":"I admit it's not the best implementation ever, anyway it works and i think it could be a good start to work on. It needs some refactoring, the step and the standard notifier share a lot of code that should be exported in separate classes (SCM classes and some kind of helper for the build status creation).\r\n\r\nexample of usage:\r\n\r\n```groovy\r\ntry {\r\n     bitbucketStatusNotify(buildStatus: 'INPROGRESS')\r\n     step 'Build'\r\n        aBuildFunction()\r\n     step 'Test'\r\n        myCoolTestFunction()\r\n     bitbucketStatusNotify(buildStatus: 'SUCCESSFUL')\r\n} catch(Exception e) {\r\n     bitbucketStatusNotify(buildStatus: 'FAILED')\r\n}\r\n```\r\n\r\nwith buildStatus 'FAILED', it raises a new exception, blocking the pipeline flow"},"comment":{"url":"https://api.github.com/repos/jenkinsci/bitbucket-build-status-notifier-plugin/issues/comments/227664015","html_url":"https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/pull/22#issuecomment-227664015","issue_url":"https://api.github.com/repos/jenkinsci/bitbucket-build-status-notifier-plugin/issues/22","id":227664015,"user":{"login":"amansilla","id":1576983,"avatar_url":"https://avatars.githubusercontent.com/u/1576983?v=3","gravatar_id":"","url":"https://api.github.com/users/amansilla","html_url":"https://github.com/amansilla","followers_url":"https://api.github.com/users/amansilla/followers","following_url":"https://api.github.com/users/amansilla/following{/other_user}","gists_url":"https://api.github.com/users/amansilla/gists{/gist_id}","starred_url":"https://api.github.com/users/amansilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amansilla/subscriptions","organizations_url":"https://api.github.com/users/amansilla/orgs","repos_url":"https://api.github.com/users/amansilla/repos","events_url":"https://api.github.com/users/amansilla/events{/privacy}","received_events_url":"https://api.github.com/users/amansilla/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T07:24:47Z","updated_at":"2016-06-22T07:24:47Z","body":"Hi @uded @trik, can one of both add some tests to cover this functionality? At the moment I've not much time for manually testing this.\r\n\r\nThis plugin is becoming bigger and we've still 0% test coverage, I think is time to start with it.\r\n\r\nThe readme should be updated as well with the instructions for using it within the pipeline. "}}
{"actor":{"display_login":"amansilla"}}