{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls/comments/144701214","pull_request_review_id":69399743,"id":144701214,"diff_hunk":"@@ -136,17 +136,12 @@ public void sendBuildMessage(StepParameters stepParameters) {\n         WebhookJobProperty property = (WebhookJobProperty) run.getParent().getProperty(WebhookJobProperty.class);\n         if (property == null) {\n             String webhookUrl = stepParameters.getWebhookUrl();\n-            if (StringUtils.isBlank(webhookUrl)) {\n-                listener.getLogger().println(\"No URL provided\");\n-                return;\n-            }\n-            try {\n-                new URL(webhookUrl);\n+            if (FormUtils.validateUrl(webhookUrl)) {","path":"src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java","position":28,"original_position":28,"commit_id":"be64adf8052aead2e22486d78726b84da3975ec0","original_commit_id":"be64adf8052aead2e22486d78726b84da3975ec0","user":{"login":"damianszczepanik","id":9612911,"avatar_url":"https://avatars1.githubusercontent.com/u/9612911?v=4","gravatar_id":"","url":"https://api.github.com/users/damianszczepanik","html_url":"https://github.com/damianszczepanik","followers_url":"https://api.github.com/users/damianszczepanik/followers","following_url":"https://api.github.com/users/damianszczepanik/following{/other_user}","gists_url":"https://api.github.com/users/damianszczepanik/gists{/gist_id}","starred_url":"https://api.github.com/users/damianszczepanik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianszczepanik/subscriptions","organizations_url":"https://api.github.com/users/damianszczepanik/orgs","repos_url":"https://api.github.com/users/damianszczepanik/repos","events_url":"https://api.github.com/users/damianszczepanik/events{/privacy}","received_events_url":"https://api.github.com/users/damianszczepanik/received_events","type":"User","site_admin":false},"body":"Based on https://github.com/jenkinsci/office-365-connector-plugin/pull/24/files#diff-4d256ee5f164b70f36b78f29a615087cR177 the only reason to make here second validation is to make this code resistant for legacy code which allowed to save invalid URL such as empty string.\r\n\r\nAnd still if this is to support legacy IMO it can be removed because it will try catch in worker","created_at":"2017-10-14T19:06:33Z","updated_at":"2017-10-14T19:06:43Z","html_url":"https://github.com/jenkinsci/office-365-connector-plugin/pull/24#discussion_r144701214","pull_request_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls/24","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls/comments/144701214"},"html":{"href":"https://github.com/jenkinsci/office-365-connector-plugin/pull/24#discussion_r144701214"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls/24","id":145340333,"html_url":"https://github.com/jenkinsci/office-365-connector-plugin/pull/24","diff_url":"https://github.com/jenkinsci/office-365-connector-plugin/pull/24.diff","patch_url":"https://github.com/jenkinsci/office-365-connector-plugin/pull/24.patch","issue_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/issues/24","number":24,"state":"open","locked":false,"title":" Improve properties syntax generator and Extend Step","user":{"login":"casz","id":1661688,"avatar_url":"https://avatars2.githubusercontent.com/u/1661688?v=4","gravatar_id":"","url":"https://api.github.com/users/casz","html_url":"https://github.com/casz","followers_url":"https://api.github.com/users/casz/followers","following_url":"https://api.github.com/users/casz/following{/other_user}","gists_url":"https://api.github.com/users/casz/gists{/gist_id}","starred_url":"https://api.github.com/users/casz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/casz/subscriptions","organizations_url":"https://api.github.com/users/casz/orgs","repos_url":"https://api.github.com/users/casz/repos","events_url":"https://api.github.com/users/casz/events{/privacy}","received_events_url":"https://api.github.com/users/casz/received_events","type":"User","site_admin":false},"body":"Here are the actual changes https://github.com/casz/office-365-connector-plugin/compare/actionablePRlink...casz:workflowstepapi\r\nThis is blocked by #17 #22\r\n\r\nWanting to fix the syntax generator and update to Step\r\n\r\nThis is how looks now when using the generator\r\n(Symbol name `office365Webhooks` is open for debate)\r\n```\r\nproperties([\r\n  office365Webhooks([[url: 'http://awesome']])\r\n])\r\n```\r\n\r\nBefore you would get, prettified to show how lengthy it is 👍 \r\n```\r\nproperties([\r\n  [\r\n    $class: 'WebhookJobProperty',\r\n    webhooks: [[\r\n      name: 'webhook',\r\n      notifyAborted: false,\r\n      notifyBackToNormal: false,\r\n      notifyFailure: false,\r\n      notifyNotBuilt: false,\r\n      notifyRepeatedFailure: false,\r\n      notifySuccess: false,\r\n      notifyUnstable: false,\r\n      startNotification: false,\r\n      timeout: 30000,\r\n      url: 'https://notsoawesome'\r\n    ]]\r\n  ]\r\n])\r\n```\r\n\r\noffice365ConnectorSend also got a symbol, so now you can do this\r\n```\r\noffice365ConnectorSend 'http://awesome'\r\n```\r\n\r\n\r\n* `Office365ConnectorSendStep` now Extends `Step` instead of `AbstractStepImpl` as it was deprecated\r\n* Added `@Symbol` to Webhook JobProperties, ya\r\n* Make `Webhook` and `Macro` descripable for simpler jelly syntax.\r\n* Simplify Jelly with help from `repeatableProperty` 🚀\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/1661688/31318264-ba93034c-ac4f-11e7-80b1-c3c480635140.png)\r\n\r\nScreenshots of properties\r\n![image](https://user-images.githubusercontent.com/1661688/31318146-cf34d37c-ac4d-11e7-931a-a40097a4439f.png)\r\n![image](https://user-images.githubusercontent.com/1661688/31318156-e7a54fcc-ac4d-11e7-9148-635bd69443c4.png)\r\n![image](https://user-images.githubusercontent.com/1661688/31318159-edaf92ce-ac4d-11e7-8bd6-6f5e1f2f7bdf.png)\r\n","created_at":"2017-10-08T15:44:19Z","updated_at":"2017-10-14T19:06:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1684fa63afc4501b42e3e1cf82a10eb8c241fb1","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls/24/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls/24/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/issues/24/comments","statuses_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/statuses/be64adf8052aead2e22486d78726b84da3975ec0","head":{"label":"casz:workflowstepapi","ref":"workflowstepapi","sha":"be64adf8052aead2e22486d78726b84da3975ec0","user":{"login":"casz","id":1661688,"avatar_url":"https://avatars2.githubusercontent.com/u/1661688?v=4","gravatar_id":"","url":"https://api.github.com/users/casz","html_url":"https://github.com/casz","followers_url":"https://api.github.com/users/casz/followers","following_url":"https://api.github.com/users/casz/following{/other_user}","gists_url":"https://api.github.com/users/casz/gists{/gist_id}","starred_url":"https://api.github.com/users/casz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/casz/subscriptions","organizations_url":"https://api.github.com/users/casz/orgs","repos_url":"https://api.github.com/users/casz/repos","events_url":"https://api.github.com/users/casz/events{/privacy}","received_events_url":"https://api.github.com/users/casz/received_events","type":"User","site_admin":false},"repo":{"id":84100876,"name":"office-365-connector-plugin","full_name":"casz/office-365-connector-plugin","owner":{"login":"casz","id":1661688,"avatar_url":"https://avatars2.githubusercontent.com/u/1661688?v=4","gravatar_id":"","url":"https://api.github.com/users/casz","html_url":"https://github.com/casz","followers_url":"https://api.github.com/users/casz/followers","following_url":"https://api.github.com/users/casz/following{/other_user}","gists_url":"https://api.github.com/users/casz/gists{/gist_id}","starred_url":"https://api.github.com/users/casz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/casz/subscriptions","organizations_url":"https://api.github.com/users/casz/orgs","repos_url":"https://api.github.com/users/casz/repos","events_url":"https://api.github.com/users/casz/events{/privacy}","received_events_url":"https://api.github.com/users/casz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/casz/office-365-connector-plugin","description":"Office 365 Connector plugin for Jenkins","fork":true,"url":"https://api.github.com/repos/casz/office-365-connector-plugin","forks_url":"https://api.github.com/repos/casz/office-365-connector-plugin/forks","keys_url":"https://api.github.com/repos/casz/office-365-connector-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/casz/office-365-connector-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/casz/office-365-connector-plugin/teams","hooks_url":"https://api.github.com/repos/casz/office-365-connector-plugin/hooks","issue_events_url":"https://api.github.com/repos/casz/office-365-connector-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/casz/office-365-connector-plugin/events","assignees_url":"https://api.github.com/repos/casz/office-365-connector-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/casz/office-365-connector-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/casz/office-365-connector-plugin/tags","blobs_url":"https://api.github.com/repos/casz/office-365-connector-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/casz/office-365-connector-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/casz/office-365-connector-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/casz/office-365-connector-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/casz/office-365-connector-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/casz/office-365-connector-plugin/languages","stargazers_url":"https://api.github.com/repos/casz/office-365-connector-plugin/stargazers","contributors_url":"https://api.github.com/repos/casz/office-365-connector-plugin/contributors","subscribers_url":"https://api.github.com/repos/casz/office-365-connector-plugin/subscribers","subscription_url":"https://api.github.com/repos/casz/office-365-connector-plugin/subscription","commits_url":"https://api.github.com/repos/casz/office-365-connector-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/casz/office-365-connector-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/casz/office-365-connector-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/casz/office-365-connector-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/casz/office-365-connector-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/casz/office-365-connector-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/casz/office-365-connector-plugin/merges","archive_url":"https://api.github.com/repos/casz/office-365-connector-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/casz/office-365-connector-plugin/downloads","issues_url":"https://api.github.com/repos/casz/office-365-connector-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/casz/office-365-connector-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/casz/office-365-connector-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/casz/office-365-connector-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/casz/office-365-connector-plugin/labels{/name}","releases_url":"https://api.github.com/repos/casz/office-365-connector-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/casz/office-365-connector-plugin/deployments","created_at":"2017-03-06T17:22:01Z","updated_at":"2017-03-06T20:36:37Z","pushed_at":"2017-10-13T06:38:17Z","git_url":"git://github.com/casz/office-365-connector-plugin.git","ssh_url":"git@github.com:casz/office-365-connector-plugin.git","clone_url":"https://github.com/casz/office-365-connector-plugin.git","svn_url":"https://github.com/casz/office-365-connector-plugin","homepage":null,"size":81798,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"2d589025f05c1f378906a81fc3fc64f45b6f4bcf","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars0.githubusercontent.com/u/107424?v=4","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":60301174,"name":"office-365-connector-plugin","full_name":"jenkinsci/office-365-connector-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars0.githubusercontent.com/u/107424?v=4","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/office-365-connector-plugin","description":"Office 365 Connector plugin for Jenkins","fork":false,"url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin","forks_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/deployments","created_at":"2016-06-02T22:19:45Z","updated_at":"2017-10-13T12:52:10Z","pushed_at":"2017-10-13T22:51:51Z","git_url":"git://github.com/jenkinsci/office-365-connector-plugin.git","ssh_url":"git@github.com:jenkinsci/office-365-connector-plugin.git","clone_url":"https://github.com/jenkinsci/office-365-connector-plugin.git","svn_url":"https://github.com/jenkinsci/office-365-connector-plugin","homepage":null,"size":81789,"stargazers_count":8,"watchers_count":8,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":6,"forks":9,"open_issues":6,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls/24"},"html":{"href":"https://github.com/jenkinsci/office-365-connector-plugin/pull/24"},"issue":{"href":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/issues/24"},"comments":{"href":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/office-365-connector-plugin/statuses/be64adf8052aead2e22486d78726b84da3975ec0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"damianszczepanik"}}