{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments/200098934","pull_request_review_id":134343313,"id":200098934,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDA5ODkzNA==","diff_hunk":"@@ -170,8 +170,24 @@ export class ResourceGroup {\n             tl.error(error.message);\n             if (error.details) {\n                 tl.error(tl.loc(\"Details\"));\n+                var isPolicyVoilated = false;\n                 for (var i = 0; i < error.details.length; i++) {\n-                    var errorMessage = util.format(\"%s: %s %s\", error.details[i].code, error.details[i].message, error.details[i].details);\n+                    var errorMessage = null;\n+                    if (error.details[i].code === \"RequestDisallowedByPolicy\") {\n+                        if (!isPolicyVoilated) {\n+                            let managementGroupId = this.getmanagementGroupId(error.details[i]);\n+                            let portalUrl = this.taskParameters.endpointPortalUrl ? this.taskParameters.endpointPortalUrl : \"https://ms.portal.azure.com\";\n+                            let policyLink = portalUrl + \"#blade/Microsoft_Azure_Policy/PolicyMenuBlade/Assignments/scope/%2Fproviders%2FMicrosoft.Management%2FmanagementGroups%2F\" + managementGroupId;","path":"Tasks/AzureResourceGroupDeploymentV2/operations/ResourceGroup.ts","position":12,"original_position":12,"commit_id":"f6c94ad8cde74131f3b836e5a1eef55363cda16a","original_commit_id":"f6c94ad8cde74131f3b836e5a1eef55363cda16a","user":{"login":"sachinma","id":17923727,"node_id":"MDQ6VXNlcjE3OTIzNzI3","avatar_url":"https://avatars2.githubusercontent.com/u/17923727?v=4","gravatar_id":"","url":"https://api.github.com/users/sachinma","html_url":"https://github.com/sachinma","followers_url":"https://api.github.com/users/sachinma/followers","following_url":"https://api.github.com/users/sachinma/following{/other_user}","gists_url":"https://api.github.com/users/sachinma/gists{/gist_id}","starred_url":"https://api.github.com/users/sachinma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sachinma/subscriptions","organizations_url":"https://api.github.com/users/sachinma/orgs","repos_url":"https://api.github.com/users/sachinma/repos","events_url":"https://api.github.com/users/sachinma/events{/privacy}","received_events_url":"https://api.github.com/users/sachinma/received_events","type":"User","site_admin":false},"body":"consider having a method to getPolicyHelpLink to keep the code in the if clause simple","created_at":"2018-07-04T11:35:40Z","updated_at":"2018-07-04T11:37:02Z","html_url":"https://github.com/Microsoft/vsts-tasks/pull/7602#discussion_r200098934","pull_request_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/7602","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments/200098934"},"html":{"href":"https://github.com/Microsoft/vsts-tasks/pull/7602#discussion_r200098934"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/7602"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/7602","id":198230805,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MjMwODA1","html_url":"https://github.com/Microsoft/vsts-tasks/pull/7602","diff_url":"https://github.com/Microsoft/vsts-tasks/pull/7602.diff","patch_url":"https://github.com/Microsoft/vsts-tasks/pull/7602.patch","issue_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/7602","number":7602,"state":"open","locked":false,"title":"Azure RG task changes for reporting policy Violation Errors","user":{"login":"eaaror","id":40058724,"node_id":"MDQ6VXNlcjQwMDU4NzI0","avatar_url":"https://avatars0.githubusercontent.com/u/40058724?v=4","gravatar_id":"","url":"https://api.github.com/users/eaaror","html_url":"https://github.com/eaaror","followers_url":"https://api.github.com/users/eaaror/followers","following_url":"https://api.github.com/users/eaaror/following{/other_user}","gists_url":"https://api.github.com/users/eaaror/gists{/gist_id}","starred_url":"https://api.github.com/users/eaaror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eaaror/subscriptions","organizations_url":"https://api.github.com/users/eaaror/orgs","repos_url":"https://api.github.com/users/eaaror/repos","events_url":"https://api.github.com/users/eaaror/events{/privacy}","received_events_url":"https://api.github.com/users/eaaror/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-29T06:57:59Z","updated_at":"2018-07-04T11:37:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4a92836f22cb2c240575a271cc035774d412cf2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/7602/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/7602/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/7602/comments","statuses_url":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/f6c94ad8cde74131f3b836e5a1eef55363cda16a","head":{"label":"eaaror:users/t-eaaror/AzureRGTaskChangesforManagementGroupScope","ref":"users/t-eaaror/AzureRGTaskChangesforManagementGroupScope","sha":"f6c94ad8cde74131f3b836e5a1eef55363cda16a","user":{"login":"eaaror","id":40058724,"node_id":"MDQ6VXNlcjQwMDU4NzI0","avatar_url":"https://avatars0.githubusercontent.com/u/40058724?v=4","gravatar_id":"","url":"https://api.github.com/users/eaaror","html_url":"https://github.com/eaaror","followers_url":"https://api.github.com/users/eaaror/followers","following_url":"https://api.github.com/users/eaaror/following{/other_user}","gists_url":"https://api.github.com/users/eaaror/gists{/gist_id}","starred_url":"https://api.github.com/users/eaaror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eaaror/subscriptions","organizations_url":"https://api.github.com/users/eaaror/orgs","repos_url":"https://api.github.com/users/eaaror/repos","events_url":"https://api.github.com/users/eaaror/events{/privacy}","received_events_url":"https://api.github.com/users/eaaror/received_events","type":"User","site_admin":false},"repo":{"id":137228514,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcyMjg1MTQ=","name":"vsts-tasks","full_name":"eaaror/vsts-tasks","owner":{"login":"eaaror","id":40058724,"node_id":"MDQ6VXNlcjQwMDU4NzI0","avatar_url":"https://avatars0.githubusercontent.com/u/40058724?v=4","gravatar_id":"","url":"https://api.github.com/users/eaaror","html_url":"https://github.com/eaaror","followers_url":"https://api.github.com/users/eaaror/followers","following_url":"https://api.github.com/users/eaaror/following{/other_user}","gists_url":"https://api.github.com/users/eaaror/gists{/gist_id}","starred_url":"https://api.github.com/users/eaaror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eaaror/subscriptions","organizations_url":"https://api.github.com/users/eaaror/orgs","repos_url":"https://api.github.com/users/eaaror/repos","events_url":"https://api.github.com/users/eaaror/events{/privacy}","received_events_url":"https://api.github.com/users/eaaror/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eaaror/vsts-tasks","description":"Build and Release Tasks for Visual Studio Team Services and Team Foundation Server","fork":true,"url":"https://api.github.com/repos/eaaror/vsts-tasks","forks_url":"https://api.github.com/repos/eaaror/vsts-tasks/forks","keys_url":"https://api.github.com/repos/eaaror/vsts-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eaaror/vsts-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eaaror/vsts-tasks/teams","hooks_url":"https://api.github.com/repos/eaaror/vsts-tasks/hooks","issue_events_url":"https://api.github.com/repos/eaaror/vsts-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/eaaror/vsts-tasks/events","assignees_url":"https://api.github.com/repos/eaaror/vsts-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/eaaror/vsts-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/eaaror/vsts-tasks/tags","blobs_url":"https://api.github.com/repos/eaaror/vsts-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eaaror/vsts-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eaaror/vsts-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/eaaror/vsts-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eaaror/vsts-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/eaaror/vsts-tasks/languages","stargazers_url":"https://api.github.com/repos/eaaror/vsts-tasks/stargazers","contributors_url":"https://api.github.com/repos/eaaror/vsts-tasks/contributors","subscribers_url":"https://api.github.com/repos/eaaror/vsts-tasks/subscribers","subscription_url":"https://api.github.com/repos/eaaror/vsts-tasks/subscription","commits_url":"https://api.github.com/repos/eaaror/vsts-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/eaaror/vsts-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/eaaror/vsts-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/eaaror/vsts-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/eaaror/vsts-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/eaaror/vsts-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eaaror/vsts-tasks/merges","archive_url":"https://api.github.com/repos/eaaror/vsts-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eaaror/vsts-tasks/downloads","issues_url":"https://api.github.com/repos/eaaror/vsts-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/eaaror/vsts-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/eaaror/vsts-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/eaaror/vsts-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eaaror/vsts-tasks/labels{/name}","releases_url":"https://api.github.com/repos/eaaror/vsts-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/eaaror/vsts-tasks/deployments","created_at":"2018-06-13T14:39:24Z","updated_at":"2018-06-13T14:39:36Z","pushed_at":"2018-07-04T10:53:23Z","git_url":"git://github.com/eaaror/vsts-tasks.git","ssh_url":"git@github.com:eaaror/vsts-tasks.git","clone_url":"https://github.com/eaaror/vsts-tasks.git","svn_url":"https://github.com/eaaror/vsts-tasks","homepage":"https://aka.ms/tfbuild","size":49781,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"ebe288d17c4143fab1dd0eb9e295cdf41b586ea4","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":27631673,"node_id":"MDEwOlJlcG9zaXRvcnkyNzYzMTY3Mw==","name":"vsts-tasks","full_name":"Microsoft/vsts-tasks","owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-tasks","description":"Build and Release Tasks for Visual Studio Team Services and Team Foundation Server","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-tasks","forks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-tasks/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-tasks/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-tasks/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-tasks/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/deployments","created_at":"2014-12-06T11:11:46Z","updated_at":"2018-07-04T09:17:13Z","pushed_at":"2018-07-04T10:53:25Z","git_url":"git://github.com/Microsoft/vsts-tasks.git","ssh_url":"git@github.com:Microsoft/vsts-tasks.git","clone_url":"https://github.com/Microsoft/vsts-tasks.git","svn_url":"https://github.com/Microsoft/vsts-tasks","homepage":"https://aka.ms/tfbuild","size":50037,"stargazers_count":910,"watchers_count":910,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":830,"mirror_url":null,"archived":false,"open_issues_count":373,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":830,"open_issues":373,"watchers":910,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/7602"},"html":{"href":"https://github.com/Microsoft/vsts-tasks/pull/7602"},"issue":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/7602"},"comments":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/7602/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/7602/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/7602/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/f6c94ad8cde74131f3b836e5a1eef55363cda16a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sachinma"}}