{"action":"created","comment":{"url":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls/comments/103459655","pull_request_review_id":24244978,"id":103459655,"diff_hunk":"@@ -70,14 +69,26 @@\n \n @javax.ws.rs.Path(\"/forge\")\n @ApplicationScoped\n-public class ObsidianResource\n-{\n-   private static final String ALLOWED_CMDS_VALIDATION_MESSAGE = \"Supported commmands are 'obsidian-new-quickstart' or 'obsidian-new-project'\";\n-   private static final String ALLOWED_CMDS_PATTERN = \"(obsidian-new-quickstart)|(obsidian-new-project)\";\n+public class ObsidianResource {\n    private static final String DEFAULT_COMMAND_NAME = \"obsidian-new-quickstart\";\n \n    private static final Logger log = Logger.getLogger(ObsidianResource.class.getName());\n-   private Map<String, String> commandMap = new HashMap<>();\n+\n+   private static String join(Iterable<String> strings, String separator) {\n+      StringBuilder buffer = new StringBuilder();\n+      boolean first = true;\n+      for (String string : strings) {\n+         if (first) {\n+            first = false;\n+         } else {\n+            buffer.append(separator);\n+         }\n+         buffer.append(string);\n+      }\n+      return buffer.toString();\n+   }\n+\n+   private final Map<String, String> commandMap = new TreeMap<>();","path":"src/main/java/org/obsidiantoaster/generator/rest/ObsidianResource.java","position":47,"original_position":47,"commit_id":"99a4e671adc7cff54f2b70d9d6176e128afaec3d","original_commit_id":"99a4e671adc7cff54f2b70d9d6176e128afaec3d","user":{"login":"gastaldi","id":54133,"avatar_url":"https://avatars.githubusercontent.com/u/54133?v=3","gravatar_id":"","url":"https://api.github.com/users/gastaldi","html_url":"https://github.com/gastaldi","followers_url":"https://api.github.com/users/gastaldi/followers","following_url":"https://api.github.com/users/gastaldi/following{/other_user}","gists_url":"https://api.github.com/users/gastaldi/gists{/gist_id}","starred_url":"https://api.github.com/users/gastaldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gastaldi/subscriptions","organizations_url":"https://api.github.com/users/gastaldi/orgs","repos_url":"https://api.github.com/users/gastaldi/repos","events_url":"https://api.github.com/users/gastaldi/events{/privacy}","received_events_url":"https://api.github.com/users/gastaldi/received_events","type":"User","site_admin":false},"body":"I think a Set would be better in here","created_at":"2017-02-28T14:08:54Z","updated_at":"2017-02-28T14:08:59Z","html_url":"https://github.com/obsidian-toaster/generator-backend/pull/25#discussion_r103459655","pull_request_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls/comments/103459655"},"html":{"href":"https://github.com/obsidian-toaster/generator-backend/pull/25#discussion_r103459655"},"pull_request":{"href":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls/25","id":108287174,"html_url":"https://github.com/obsidian-toaster/generator-backend/pull/25","diff_url":"https://github.com/obsidian-toaster/generator-backend/pull/25.diff","patch_url":"https://github.com/obsidian-toaster/generator-backend/pull/25.patch","issue_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/issues/25","number":25,"state":"open","locked":false,"title":"fixes #24 to make it easier to extend the available commands","user":{"login":"jstrachan","id":30140,"avatar_url":"https://avatars.githubusercontent.com/u/30140?v=3","gravatar_id":"","url":"https://api.github.com/users/jstrachan","html_url":"https://github.com/jstrachan","followers_url":"https://api.github.com/users/jstrachan/followers","following_url":"https://api.github.com/users/jstrachan/following{/other_user}","gists_url":"https://api.github.com/users/jstrachan/gists{/gist_id}","starred_url":"https://api.github.com/users/jstrachan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstrachan/subscriptions","organizations_url":"https://api.github.com/users/jstrachan/orgs","repos_url":"https://api.github.com/users/jstrachan/repos","events_url":"https://api.github.com/users/jstrachan/events{/privacy}","received_events_url":"https://api.github.com/users/jstrachan/received_events","type":"User","site_admin":false},"body":null,"created_at":"2017-02-28T09:14:34Z","updated_at":"2017-02-28T14:08:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98dac5f87b6f41b0c875e5f42a9cf16092b301f0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls/25/commits","review_comments_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls/25/comments","review_comment_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/issues/25/comments","statuses_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/statuses/99a4e671adc7cff54f2b70d9d6176e128afaec3d","head":{"label":"fabric8io:devtools","ref":"devtools","sha":"99a4e671adc7cff54f2b70d9d6176e128afaec3d","user":{"login":"fabric8io","id":6074349,"avatar_url":"https://avatars.githubusercontent.com/u/6074349?v=3","gravatar_id":"","url":"https://api.github.com/users/fabric8io","html_url":"https://github.com/fabric8io","followers_url":"https://api.github.com/users/fabric8io/followers","following_url":"https://api.github.com/users/fabric8io/following{/other_user}","gists_url":"https://api.github.com/users/fabric8io/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8io/subscriptions","organizations_url":"https://api.github.com/users/fabric8io/orgs","repos_url":"https://api.github.com/users/fabric8io/repos","events_url":"https://api.github.com/users/fabric8io/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8io/received_events","type":"Organization","site_admin":false},"repo":{"id":83412764,"name":"generator-backend","full_name":"fabric8io/generator-backend","owner":{"login":"fabric8io","id":6074349,"avatar_url":"https://avatars.githubusercontent.com/u/6074349?v=3","gravatar_id":"","url":"https://api.github.com/users/fabric8io","html_url":"https://github.com/fabric8io","followers_url":"https://api.github.com/users/fabric8io/followers","following_url":"https://api.github.com/users/fabric8io/following{/other_user}","gists_url":"https://api.github.com/users/fabric8io/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8io/subscriptions","organizations_url":"https://api.github.com/users/fabric8io/orgs","repos_url":"https://api.github.com/users/fabric8io/repos","events_url":"https://api.github.com/users/fabric8io/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fabric8io/generator-backend","description":"The back-end for the Obsidian project generator","fork":true,"url":"https://api.github.com/repos/fabric8io/generator-backend","forks_url":"https://api.github.com/repos/fabric8io/generator-backend/forks","keys_url":"https://api.github.com/repos/fabric8io/generator-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabric8io/generator-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabric8io/generator-backend/teams","hooks_url":"https://api.github.com/repos/fabric8io/generator-backend/hooks","issue_events_url":"https://api.github.com/repos/fabric8io/generator-backend/issues/events{/number}","events_url":"https://api.github.com/repos/fabric8io/generator-backend/events","assignees_url":"https://api.github.com/repos/fabric8io/generator-backend/assignees{/user}","branches_url":"https://api.github.com/repos/fabric8io/generator-backend/branches{/branch}","tags_url":"https://api.github.com/repos/fabric8io/generator-backend/tags","blobs_url":"https://api.github.com/repos/fabric8io/generator-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabric8io/generator-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabric8io/generator-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabric8io/generator-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabric8io/generator-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/fabric8io/generator-backend/languages","stargazers_url":"https://api.github.com/repos/fabric8io/generator-backend/stargazers","contributors_url":"https://api.github.com/repos/fabric8io/generator-backend/contributors","subscribers_url":"https://api.github.com/repos/fabric8io/generator-backend/subscribers","subscription_url":"https://api.github.com/repos/fabric8io/generator-backend/subscription","commits_url":"https://api.github.com/repos/fabric8io/generator-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabric8io/generator-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabric8io/generator-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabric8io/generator-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabric8io/generator-backend/contents/{+path}","compare_url":"https://api.github.com/repos/fabric8io/generator-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabric8io/generator-backend/merges","archive_url":"https://api.github.com/repos/fabric8io/generator-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabric8io/generator-backend/downloads","issues_url":"https://api.github.com/repos/fabric8io/generator-backend/issues{/number}","pulls_url":"https://api.github.com/repos/fabric8io/generator-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/fabric8io/generator-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/fabric8io/generator-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabric8io/generator-backend/labels{/name}","releases_url":"https://api.github.com/repos/fabric8io/generator-backend/releases{/id}","deployments_url":"https://api.github.com/repos/fabric8io/generator-backend/deployments","created_at":"2017-02-28T09:14:08Z","updated_at":"2017-02-28T09:14:09Z","pushed_at":"2017-02-28T09:14:25Z","git_url":"git://github.com/fabric8io/generator-backend.git","ssh_url":"git@github.com:fabric8io/generator-backend.git","clone_url":"https://github.com/fabric8io/generator-backend.git","svn_url":"https://github.com/fabric8io/generator-backend","homepage":"","size":176,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"obsidian-toaster:master","ref":"master","sha":"787a314d386d95d5d929f03ec213e1e7f332bdad","user":{"login":"obsidian-toaster","id":23121540,"avatar_url":"https://avatars.githubusercontent.com/u/23121540?v=3","gravatar_id":"","url":"https://api.github.com/users/obsidian-toaster","html_url":"https://github.com/obsidian-toaster","followers_url":"https://api.github.com/users/obsidian-toaster/followers","following_url":"https://api.github.com/users/obsidian-toaster/following{/other_user}","gists_url":"https://api.github.com/users/obsidian-toaster/gists{/gist_id}","starred_url":"https://api.github.com/users/obsidian-toaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obsidian-toaster/subscriptions","organizations_url":"https://api.github.com/users/obsidian-toaster/orgs","repos_url":"https://api.github.com/users/obsidian-toaster/repos","events_url":"https://api.github.com/users/obsidian-toaster/events{/privacy}","received_events_url":"https://api.github.com/users/obsidian-toaster/received_events","type":"Organization","site_admin":false},"repo":{"id":72767746,"name":"generator-backend","full_name":"obsidian-toaster/generator-backend","owner":{"login":"obsidian-toaster","id":23121540,"avatar_url":"https://avatars.githubusercontent.com/u/23121540?v=3","gravatar_id":"","url":"https://api.github.com/users/obsidian-toaster","html_url":"https://github.com/obsidian-toaster","followers_url":"https://api.github.com/users/obsidian-toaster/followers","following_url":"https://api.github.com/users/obsidian-toaster/following{/other_user}","gists_url":"https://api.github.com/users/obsidian-toaster/gists{/gist_id}","starred_url":"https://api.github.com/users/obsidian-toaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obsidian-toaster/subscriptions","organizations_url":"https://api.github.com/users/obsidian-toaster/orgs","repos_url":"https://api.github.com/users/obsidian-toaster/repos","events_url":"https://api.github.com/users/obsidian-toaster/events{/privacy}","received_events_url":"https://api.github.com/users/obsidian-toaster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/obsidian-toaster/generator-backend","description":"The back-end for the Obsidian project generator","fork":false,"url":"https://api.github.com/repos/obsidian-toaster/generator-backend","forks_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/forks","keys_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/teams","hooks_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/hooks","issue_events_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/issues/events{/number}","events_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/events","assignees_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/assignees{/user}","branches_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/branches{/branch}","tags_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/tags","blobs_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/languages","stargazers_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/stargazers","contributors_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/contributors","subscribers_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/subscribers","subscription_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/subscription","commits_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/contents/{+path}","compare_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/merges","archive_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/downloads","issues_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/issues{/number}","pulls_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/labels{/name}","releases_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/releases{/id}","deployments_url":"https://api.github.com/repos/obsidian-toaster/generator-backend/deployments","created_at":"2016-11-03T17:03:59Z","updated_at":"2016-12-06T16:01:12Z","pushed_at":"2017-02-28T09:14:35Z","git_url":"git://github.com/obsidian-toaster/generator-backend.git","ssh_url":"git@github.com:obsidian-toaster/generator-backend.git","clone_url":"https://github.com/obsidian-toaster/generator-backend.git","svn_url":"https://github.com/obsidian-toaster/generator-backend","homepage":"","size":171,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":4,"forks":6,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls/25"},"html":{"href":"https://github.com/obsidian-toaster/generator-backend/pull/25"},"issue":{"href":"https://api.github.com/repos/obsidian-toaster/generator-backend/issues/25"},"comments":{"href":"https://api.github.com/repos/obsidian-toaster/generator-backend/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/obsidian-toaster/generator-backend/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/obsidian-toaster/generator-backend/statuses/99a4e671adc7cff54f2b70d9d6176e128afaec3d"}}}}
{"actor":{"display_login":"gastaldi"}}