{"action":"created","comment":{"url":"https://api.github.com/repos/itsallcode/openfasttrace/pulls/comments/179923210","pull_request_review_id":110261779,"id":179923210,"diff_hunk":"@@ -0,0 +1,93 @@\n+package org.itsallcode.openfasttrace.importer.legacytag.config;\n+\n+/*-\n+ * #%L\n+ * OpenFastTrace\n+ * %%\n+ * Copyright (C) 2016 - 2018 itsallcode.org\n+ * %%\n+ * This program is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as\n+ * published by the Free Software Foundation, either version 3 of the\n+ * License, or (at your option) any later version.\n+ * \n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ * \n+ * You should have received a copy of the GNU General Public\n+ * License along with this program.  If not, see\n+ * <http://www.gnu.org/licenses/gpl-3.0.html>.\n+ * #L%\n+ */\n+\n+import java.nio.file.FileSystems;\n+import java.nio.file.Path;\n+import java.nio.file.PathMatcher;\n+import java.util.HashSet;\n+import java.util.List;\n+import java.util.Set;\n+\n+class DescribedPathMatcher\n+{\n+    private static final String REGEX_PREFIX = \"regex:\";\n+    private static final String GLOB_PREFIX = \"glob:\";\n+\n+    private final String description;\n+    private final PathMatcher matcher;\n+\n+    private DescribedPathMatcher(final String description, final PathMatcher matcher)\n+    {\n+        this.description = description;\n+        this.matcher = matcher;\n+    }\n+\n+    static DescribedPathMatcher createPatternMatcher(final String pattern)\n+    {\n+        final String fullPattern = addMissingPatternPrefix(pattern);\n+        final PathMatcher patternMatcher = FileSystems.getDefault().getPathMatcher(fullPattern);\n+        return new DescribedPathMatcher(fullPattern, patternMatcher);\n+    }\n+\n+    static DescribedPathMatcher createPathListMatcher(final List<Path> paths)\n+    {\n+        final ListBasedPathMatcher listMatcher = new ListBasedPathMatcher(new HashSet<>(paths));\n+        return new DescribedPathMatcher(paths.toString(), listMatcher);\n+    }\n+\n+    private static String addMissingPatternPrefix(final String pattern)\n+    {\n+        if (pattern.startsWith(GLOB_PREFIX) || pattern.startsWith(REGEX_PREFIX))\n+        {\n+            return pattern;\n+        }\n+        return GLOB_PREFIX + pattern;\n+    }\n+\n+    String getDescription()\n+    {\n+        return this.description;\n+    }\n+\n+    boolean matches(final Path path)","path":"src/main/java/org/itsallcode/openfasttrace/importer/legacytag/config/DescribedPathMatcher.java","position":73,"original_position":73,"commit_id":"d1e468b48cc722c09a2425935290b227410dfc92","original_commit_id":"d1e468b48cc722c09a2425935290b227410dfc92","user":{"login":"redcatbear","id":584162,"avatar_url":"https://avatars0.githubusercontent.com/u/584162?v=4","gravatar_id":"","url":"https://api.github.com/users/redcatbear","html_url":"https://github.com/redcatbear","followers_url":"https://api.github.com/users/redcatbear/followers","following_url":"https://api.github.com/users/redcatbear/following{/other_user}","gists_url":"https://api.github.com/users/redcatbear/gists{/gist_id}","starred_url":"https://api.github.com/users/redcatbear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redcatbear/subscriptions","organizations_url":"https://api.github.com/users/redcatbear/orgs","repos_url":"https://api.github.com/users/redcatbear/repos","events_url":"https://api.github.com/users/redcatbear/events{/privacy}","received_events_url":"https://api.github.com/users/redcatbear/received_events","type":"User","site_admin":false},"body":"package scope on purpose?","created_at":"2018-04-07T17:40:54Z","updated_at":"2018-04-07T17:44:47Z","html_url":"https://github.com/itsallcode/openfasttrace/pull/128#discussion_r179923210","pull_request_url":"https://api.github.com/repos/itsallcode/openfasttrace/pulls/128","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/itsallcode/openfasttrace/pulls/comments/179923210"},"html":{"href":"https://github.com/itsallcode/openfasttrace/pull/128#discussion_r179923210"},"pull_request":{"href":"https://api.github.com/repos/itsallcode/openfasttrace/pulls/128"}}},"pull_request":{"url":"https://api.github.com/repos/itsallcode/openfasttrace/pulls/128","id":180093043,"html_url":"https://github.com/itsallcode/openfasttrace/pull/128","diff_url":"https://github.com/itsallcode/openfasttrace/pull/128.diff","patch_url":"https://github.com/itsallcode/openfasttrace/pull/128.patch","issue_url":"https://api.github.com/repos/itsallcode/openfasttrace/issues/128","number":128,"state":"open","locked":false,"title":"Refactor path config","user":{"login":"kaklakariada","id":4711730,"avatar_url":"https://avatars1.githubusercontent.com/u/4711730?v=4","gravatar_id":"","url":"https://api.github.com/users/kaklakariada","html_url":"https://github.com/kaklakariada","followers_url":"https://api.github.com/users/kaklakariada/followers","following_url":"https://api.github.com/users/kaklakariada/following{/other_user}","gists_url":"https://api.github.com/users/kaklakariada/gists{/gist_id}","starred_url":"https://api.github.com/users/kaklakariada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaklakariada/subscriptions","organizations_url":"https://api.github.com/users/kaklakariada/orgs","repos_url":"https://api.github.com/users/kaklakariada/repos","events_url":"https://api.github.com/users/kaklakariada/events{/privacy}","received_events_url":"https://api.github.com/users/kaklakariada/received_events","type":"User","site_admin":false},"body":"Allow configuring a list of paths instead of pattern","created_at":"2018-04-07T06:54:38Z","updated_at":"2018-04-07T17:44:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2aa0da18df843ac598db3e1b5d392f4924305e7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/itsallcode/openfasttrace/pulls/128/commits","review_comments_url":"https://api.github.com/repos/itsallcode/openfasttrace/pulls/128/comments","review_comment_url":"https://api.github.com/repos/itsallcode/openfasttrace/pulls/comments{/number}","comments_url":"https://api.github.com/repos/itsallcode/openfasttrace/issues/128/comments","statuses_url":"https://api.github.com/repos/itsallcode/openfasttrace/statuses/d1e468b48cc722c09a2425935290b227410dfc92","head":{"label":"itsallcode:refactor_path_config","ref":"refactor_path_config","sha":"d1e468b48cc722c09a2425935290b227410dfc92","user":{"login":"itsallcode","id":12786252,"avatar_url":"https://avatars2.githubusercontent.com/u/12786252?v=4","gravatar_id":"","url":"https://api.github.com/users/itsallcode","html_url":"https://github.com/itsallcode","followers_url":"https://api.github.com/users/itsallcode/followers","following_url":"https://api.github.com/users/itsallcode/following{/other_user}","gists_url":"https://api.github.com/users/itsallcode/gists{/gist_id}","starred_url":"https://api.github.com/users/itsallcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsallcode/subscriptions","organizations_url":"https://api.github.com/users/itsallcode/orgs","repos_url":"https://api.github.com/users/itsallcode/repos","events_url":"https://api.github.com/users/itsallcode/events{/privacy}","received_events_url":"https://api.github.com/users/itsallcode/received_events","type":"Organization","site_admin":false},"repo":{"id":48654534,"name":"openfasttrace","full_name":"itsallcode/openfasttrace","owner":{"login":"itsallcode","id":12786252,"avatar_url":"https://avatars2.githubusercontent.com/u/12786252?v=4","gravatar_id":"","url":"https://api.github.com/users/itsallcode","html_url":"https://github.com/itsallcode","followers_url":"https://api.github.com/users/itsallcode/followers","following_url":"https://api.github.com/users/itsallcode/following{/other_user}","gists_url":"https://api.github.com/users/itsallcode/gists{/gist_id}","starred_url":"https://api.github.com/users/itsallcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsallcode/subscriptions","organizations_url":"https://api.github.com/users/itsallcode/orgs","repos_url":"https://api.github.com/users/itsallcode/repos","events_url":"https://api.github.com/users/itsallcode/events{/privacy}","received_events_url":"https://api.github.com/users/itsallcode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/itsallcode/openfasttrace","description":"Requirement tracking suite","fork":false,"url":"https://api.github.com/repos/itsallcode/openfasttrace","forks_url":"https://api.github.com/repos/itsallcode/openfasttrace/forks","keys_url":"https://api.github.com/repos/itsallcode/openfasttrace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itsallcode/openfasttrace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itsallcode/openfasttrace/teams","hooks_url":"https://api.github.com/repos/itsallcode/openfasttrace/hooks","issue_events_url":"https://api.github.com/repos/itsallcode/openfasttrace/issues/events{/number}","events_url":"https://api.github.com/repos/itsallcode/openfasttrace/events","assignees_url":"https://api.github.com/repos/itsallcode/openfasttrace/assignees{/user}","branches_url":"https://api.github.com/repos/itsallcode/openfasttrace/branches{/branch}","tags_url":"https://api.github.com/repos/itsallcode/openfasttrace/tags","blobs_url":"https://api.github.com/repos/itsallcode/openfasttrace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itsallcode/openfasttrace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itsallcode/openfasttrace/git/refs{/sha}","trees_url":"https://api.github.com/repos/itsallcode/openfasttrace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itsallcode/openfasttrace/statuses/{sha}","languages_url":"https://api.github.com/repos/itsallcode/openfasttrace/languages","stargazers_url":"https://api.github.com/repos/itsallcode/openfasttrace/stargazers","contributors_url":"https://api.github.com/repos/itsallcode/openfasttrace/contributors","subscribers_url":"https://api.github.com/repos/itsallcode/openfasttrace/subscribers","subscription_url":"https://api.github.com/repos/itsallcode/openfasttrace/subscription","commits_url":"https://api.github.com/repos/itsallcode/openfasttrace/commits{/sha}","git_commits_url":"https://api.github.com/repos/itsallcode/openfasttrace/git/commits{/sha}","comments_url":"https://api.github.com/repos/itsallcode/openfasttrace/comments{/number}","issue_comment_url":"https://api.github.com/repos/itsallcode/openfasttrace/issues/comments{/number}","contents_url":"https://api.github.com/repos/itsallcode/openfasttrace/contents/{+path}","compare_url":"https://api.github.com/repos/itsallcode/openfasttrace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itsallcode/openfasttrace/merges","archive_url":"https://api.github.com/repos/itsallcode/openfasttrace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itsallcode/openfasttrace/downloads","issues_url":"https://api.github.com/repos/itsallcode/openfasttrace/issues{/number}","pulls_url":"https://api.github.com/repos/itsallcode/openfasttrace/pulls{/number}","milestones_url":"https://api.github.com/repos/itsallcode/openfasttrace/milestones{/number}","notifications_url":"https://api.github.com/repos/itsallcode/openfasttrace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itsallcode/openfasttrace/labels{/name}","releases_url":"https://api.github.com/repos/itsallcode/openfasttrace/releases{/id}","deployments_url":"https://api.github.com/repos/itsallcode/openfasttrace/deployments","created_at":"2015-12-27T17:50:25Z","updated_at":"2018-04-04T18:22:14Z","pushed_at":"2018-04-07T07:09:52Z","git_url":"git://github.com/itsallcode/openfasttrace.git","ssh_url":"git@github.com:itsallcode/openfasttrace.git","clone_url":"https://github.com/itsallcode/openfasttrace.git","svn_url":"https://github.com/itsallcode/openfasttrace","homepage":null,"size":1887,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":1,"open_issues":17,"watchers":6,"default_branch":"develop"}},"base":{"label":"itsallcode:develop","ref":"develop","sha":"6574de706d16038bb24f8c07b181441e4f2a35c5","user":{"login":"itsallcode","id":12786252,"avatar_url":"https://avatars2.githubusercontent.com/u/12786252?v=4","gravatar_id":"","url":"https://api.github.com/users/itsallcode","html_url":"https://github.com/itsallcode","followers_url":"https://api.github.com/users/itsallcode/followers","following_url":"https://api.github.com/users/itsallcode/following{/other_user}","gists_url":"https://api.github.com/users/itsallcode/gists{/gist_id}","starred_url":"https://api.github.com/users/itsallcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsallcode/subscriptions","organizations_url":"https://api.github.com/users/itsallcode/orgs","repos_url":"https://api.github.com/users/itsallcode/repos","events_url":"https://api.github.com/users/itsallcode/events{/privacy}","received_events_url":"https://api.github.com/users/itsallcode/received_events","type":"Organization","site_admin":false},"repo":{"id":48654534,"name":"openfasttrace","full_name":"itsallcode/openfasttrace","owner":{"login":"itsallcode","id":12786252,"avatar_url":"https://avatars2.githubusercontent.com/u/12786252?v=4","gravatar_id":"","url":"https://api.github.com/users/itsallcode","html_url":"https://github.com/itsallcode","followers_url":"https://api.github.com/users/itsallcode/followers","following_url":"https://api.github.com/users/itsallcode/following{/other_user}","gists_url":"https://api.github.com/users/itsallcode/gists{/gist_id}","starred_url":"https://api.github.com/users/itsallcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsallcode/subscriptions","organizations_url":"https://api.github.com/users/itsallcode/orgs","repos_url":"https://api.github.com/users/itsallcode/repos","events_url":"https://api.github.com/users/itsallcode/events{/privacy}","received_events_url":"https://api.github.com/users/itsallcode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/itsallcode/openfasttrace","description":"Requirement tracking suite","fork":false,"url":"https://api.github.com/repos/itsallcode/openfasttrace","forks_url":"https://api.github.com/repos/itsallcode/openfasttrace/forks","keys_url":"https://api.github.com/repos/itsallcode/openfasttrace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itsallcode/openfasttrace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itsallcode/openfasttrace/teams","hooks_url":"https://api.github.com/repos/itsallcode/openfasttrace/hooks","issue_events_url":"https://api.github.com/repos/itsallcode/openfasttrace/issues/events{/number}","events_url":"https://api.github.com/repos/itsallcode/openfasttrace/events","assignees_url":"https://api.github.com/repos/itsallcode/openfasttrace/assignees{/user}","branches_url":"https://api.github.com/repos/itsallcode/openfasttrace/branches{/branch}","tags_url":"https://api.github.com/repos/itsallcode/openfasttrace/tags","blobs_url":"https://api.github.com/repos/itsallcode/openfasttrace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itsallcode/openfasttrace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itsallcode/openfasttrace/git/refs{/sha}","trees_url":"https://api.github.com/repos/itsallcode/openfasttrace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itsallcode/openfasttrace/statuses/{sha}","languages_url":"https://api.github.com/repos/itsallcode/openfasttrace/languages","stargazers_url":"https://api.github.com/repos/itsallcode/openfasttrace/stargazers","contributors_url":"https://api.github.com/repos/itsallcode/openfasttrace/contributors","subscribers_url":"https://api.github.com/repos/itsallcode/openfasttrace/subscribers","subscription_url":"https://api.github.com/repos/itsallcode/openfasttrace/subscription","commits_url":"https://api.github.com/repos/itsallcode/openfasttrace/commits{/sha}","git_commits_url":"https://api.github.com/repos/itsallcode/openfasttrace/git/commits{/sha}","comments_url":"https://api.github.com/repos/itsallcode/openfasttrace/comments{/number}","issue_comment_url":"https://api.github.com/repos/itsallcode/openfasttrace/issues/comments{/number}","contents_url":"https://api.github.com/repos/itsallcode/openfasttrace/contents/{+path}","compare_url":"https://api.github.com/repos/itsallcode/openfasttrace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itsallcode/openfasttrace/merges","archive_url":"https://api.github.com/repos/itsallcode/openfasttrace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itsallcode/openfasttrace/downloads","issues_url":"https://api.github.com/repos/itsallcode/openfasttrace/issues{/number}","pulls_url":"https://api.github.com/repos/itsallcode/openfasttrace/pulls{/number}","milestones_url":"https://api.github.com/repos/itsallcode/openfasttrace/milestones{/number}","notifications_url":"https://api.github.com/repos/itsallcode/openfasttrace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itsallcode/openfasttrace/labels{/name}","releases_url":"https://api.github.com/repos/itsallcode/openfasttrace/releases{/id}","deployments_url":"https://api.github.com/repos/itsallcode/openfasttrace/deployments","created_at":"2015-12-27T17:50:25Z","updated_at":"2018-04-04T18:22:14Z","pushed_at":"2018-04-07T07:09:52Z","git_url":"git://github.com/itsallcode/openfasttrace.git","ssh_url":"git@github.com:itsallcode/openfasttrace.git","clone_url":"https://github.com/itsallcode/openfasttrace.git","svn_url":"https://github.com/itsallcode/openfasttrace","homepage":null,"size":1887,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":1,"open_issues":17,"watchers":6,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/itsallcode/openfasttrace/pulls/128"},"html":{"href":"https://github.com/itsallcode/openfasttrace/pull/128"},"issue":{"href":"https://api.github.com/repos/itsallcode/openfasttrace/issues/128"},"comments":{"href":"https://api.github.com/repos/itsallcode/openfasttrace/issues/128/comments"},"review_comments":{"href":"https://api.github.com/repos/itsallcode/openfasttrace/pulls/128/comments"},"review_comment":{"href":"https://api.github.com/repos/itsallcode/openfasttrace/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/itsallcode/openfasttrace/pulls/128/commits"},"statuses":{"href":"https://api.github.com/repos/itsallcode/openfasttrace/statuses/d1e468b48cc722c09a2425935290b227410dfc92"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"redcatbear"}}