{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls/comments/152544627","pull_request_review_id":78422489,"id":152544627,"diff_hunk":"@@ -114,8 +115,33 @@ export class ArtifactEngine {\n         }\n     }\n \n+    shouldDownload(path: string) {\n+        var shouldDownload = false;\n+        for (let pattern of this.patternList) {\n+            if (pattern.charAt(0) === '-' && (minimatch(path, pattern.substr(1), { dot: true, nocase: true }))) {\n+                return false;\n+            }\n+            else {\n+                if (minimatch(path, (pattern.charAt(0) === '+') ? pattern.substr(1) : pattern, { dot: true, nocase: true })) {\n+                    shouldDownload = true;\n+                }\n+            }\n+        }\n+        return shouldDownload;\n+    }\n+\n+    createPatternList(artifactEngineOptions: ArtifactEngineOptions) {\n+        if (!artifactEngineOptions.itemPattern) {\n+            this.patternList = ['**'];\n+        }\n+        else {\n+            this.patternList = artifactEngineOptions.itemPattern.split('\",\"').map((pattern) => pattern.replace(/\"/g, ''));","path":"Extensions/ArtifactEngine/Engine/artifactEngine.ts","position":41,"original_position":41,"commit_id":"bd5d11891cb0fbec7a66bd74e7af8bd354f7dbb1","original_commit_id":"bd5d11891cb0fbec7a66bd74e7af8bd354f7dbb1","user":{"login":"gykuma","id":33627957,"avatar_url":"https://avatars1.githubusercontent.com/u/33627957?v=4","gravatar_id":"","url":"https://api.github.com/users/gykuma","html_url":"https://github.com/gykuma","followers_url":"https://api.github.com/users/gykuma/followers","following_url":"https://api.github.com/users/gykuma/following{/other_user}","gists_url":"https://api.github.com/users/gykuma/gists{/gist_id}","starred_url":"https://api.github.com/users/gykuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gykuma/subscriptions","organizations_url":"https://api.github.com/users/gykuma/orgs","repos_url":"https://api.github.com/users/gykuma/repos","events_url":"https://api.github.com/users/gykuma/events{/privacy}","received_events_url":"https://api.github.com/users/gykuma/received_events","type":"User","site_admin":false},"body":"We planned the pattern string to be only as \"+drop\\**\",\"-drop\\folder\\**\" (without spaces). Should I add support for spaces also?","created_at":"2017-11-22T12:06:27Z","updated_at":"2017-11-22T12:06:27Z","html_url":"https://github.com/Microsoft/vsts-rm-extensions/pull/309#discussion_r152544627","pull_request_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls/309","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls/comments/152544627"},"html":{"href":"https://github.com/Microsoft/vsts-rm-extensions/pull/309#discussion_r152544627"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls/309"}},"in_reply_to_id":152491784},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls/309","id":153707092,"html_url":"https://github.com/Microsoft/vsts-rm-extensions/pull/309","diff_url":"https://github.com/Microsoft/vsts-rm-extensions/pull/309.diff","patch_url":"https://github.com/Microsoft/vsts-rm-extensions/pull/309.patch","issue_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/issues/309","number":309,"state":"closed","locked":false,"title":"Support for include/exclude and multiple item patterns","user":{"login":"gykuma","id":33627957,"avatar_url":"https://avatars1.githubusercontent.com/u/33627957?v=4","gravatar_id":"","url":"https://api.github.com/users/gykuma","html_url":"https://github.com/gykuma","followers_url":"https://api.github.com/users/gykuma/followers","following_url":"https://api.github.com/users/gykuma/following{/other_user}","gists_url":"https://api.github.com/users/gykuma/gists{/gist_id}","starred_url":"https://api.github.com/users/gykuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gykuma/subscriptions","organizations_url":"https://api.github.com/users/gykuma/orgs","repos_url":"https://api.github.com/users/gykuma/repos","events_url":"https://api.github.com/users/gykuma/events{/privacy}","received_events_url":"https://api.github.com/users/gykuma/received_events","type":"User","site_admin":false},"body":"Added support for multiple item patterns and include/exclude pattern for artifact download\r\nAdded L0 tests","created_at":"2017-11-20T18:53:20Z","updated_at":"2017-11-22T12:06:27Z","closed_at":"2017-11-21T14:52:44Z","merged_at":"2017-11-21T14:52:44Z","merge_commit_sha":"f25a1e71e7341f1dd563eaefd4e355014226675a","assignee":{"login":"gykuma","id":33627957,"avatar_url":"https://avatars1.githubusercontent.com/u/33627957?v=4","gravatar_id":"","url":"https://api.github.com/users/gykuma","html_url":"https://github.com/gykuma","followers_url":"https://api.github.com/users/gykuma/followers","following_url":"https://api.github.com/users/gykuma/following{/other_user}","gists_url":"https://api.github.com/users/gykuma/gists{/gist_id}","starred_url":"https://api.github.com/users/gykuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gykuma/subscriptions","organizations_url":"https://api.github.com/users/gykuma/orgs","repos_url":"https://api.github.com/users/gykuma/repos","events_url":"https://api.github.com/users/gykuma/events{/privacy}","received_events_url":"https://api.github.com/users/gykuma/received_events","type":"User","site_admin":false},"assignees":[{"login":"gykuma","id":33627957,"avatar_url":"https://avatars1.githubusercontent.com/u/33627957?v=4","gravatar_id":"","url":"https://api.github.com/users/gykuma","html_url":"https://github.com/gykuma","followers_url":"https://api.github.com/users/gykuma/followers","following_url":"https://api.github.com/users/gykuma/following{/other_user}","gists_url":"https://api.github.com/users/gykuma/gists{/gist_id}","starred_url":"https://api.github.com/users/gykuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gykuma/subscriptions","organizations_url":"https://api.github.com/users/gykuma/orgs","repos_url":"https://api.github.com/users/gykuma/repos","events_url":"https://api.github.com/users/gykuma/events{/privacy}","received_events_url":"https://api.github.com/users/gykuma/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls/309/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls/309/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/issues/309/comments","statuses_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/statuses/bd5d11891cb0fbec7a66bd74e7af8bd354f7dbb1","head":{"label":"Microsoft:users/gykuma/SupportMultipleArtifactItemPatterns","ref":"users/gykuma/SupportMultipleArtifactItemPatterns","sha":"bd5d11891cb0fbec7a66bd74e7af8bd354f7dbb1","user":{"login":"Microsoft","id":6154722,"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":55225846,"name":"vsts-rm-extensions","full_name":"Microsoft/vsts-rm-extensions","owner":{"login":"Microsoft","id":6154722,"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-rm-extensions","description":"Collection of all RM and deployment extensions","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions","forks_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/deployments","created_at":"2016-04-01T10:56:59Z","updated_at":"2017-11-21T14:45:53Z","pushed_at":"2017-11-21T15:17:08Z","git_url":"git://github.com/Microsoft/vsts-rm-extensions.git","ssh_url":"git@github.com:Microsoft/vsts-rm-extensions.git","clone_url":"https://github.com/Microsoft/vsts-rm-extensions.git","svn_url":"https://github.com/Microsoft/vsts-rm-extensions","homepage":"http://www.visualstudio.com/explore/release-management-vs","size":3406,"stargazers_count":45,"watchers_count":45,"language":"PowerShell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":30,"forks":23,"open_issues":30,"watchers":45,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"2ee0ed24f72670c15e14595827c05379bab639f5","user":{"login":"Microsoft","id":6154722,"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":55225846,"name":"vsts-rm-extensions","full_name":"Microsoft/vsts-rm-extensions","owner":{"login":"Microsoft","id":6154722,"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-rm-extensions","description":"Collection of all RM and deployment extensions","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions","forks_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/deployments","created_at":"2016-04-01T10:56:59Z","updated_at":"2017-11-21T14:45:53Z","pushed_at":"2017-11-21T15:17:08Z","git_url":"git://github.com/Microsoft/vsts-rm-extensions.git","ssh_url":"git@github.com:Microsoft/vsts-rm-extensions.git","clone_url":"https://github.com/Microsoft/vsts-rm-extensions.git","svn_url":"https://github.com/Microsoft/vsts-rm-extensions","homepage":"http://www.visualstudio.com/explore/release-management-vs","size":3406,"stargazers_count":45,"watchers_count":45,"language":"PowerShell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":30,"forks":23,"open_issues":30,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls/309"},"html":{"href":"https://github.com/Microsoft/vsts-rm-extensions/pull/309"},"issue":{"href":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/issues/309"},"comments":{"href":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/issues/309/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls/309/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/pulls/309/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vsts-rm-extensions/statuses/bd5d11891cb0fbec7a66bd74e7af8bd354f7dbb1"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"gykuma"}}