payload: {"action":"created","comment":{"url":"https://api.github.com/repos/codimd/server/pulls/comments/321028285","pull_request_review_id":283962159,"id":321028285,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyMTAyODI4NQ==","diff_hunk":"@@ -123,10 +123,10 @@ function newNote (req, res, next) {\n   }\n   models.Note.create({\n     ownerId: owner,\n-    alias: req.alias ? req.alias : null,\n+    alias: req.alias ? req.alias : (config.allowFreeURL ? (req.params.alias ? req.params.alias : null) : null),\n     content: body\n   }).then(function (note) {\n-    return res.redirect(config.serverURL + '/' + models.Note.encodeNoteId(note.id))\n+    return res.redirect(config.serverURL + '/' + (note.alias ? note.alias : models.Note.encodeNoteId(note.id)))","path":"lib/response.js","position":50,"original_position":9,"commit_id":"6e5e6696ad5c336be700641caf94676a281fc181","original_commit_id":"8d29d74b02fb07be8efaae002fca9b9033c536f0","user":{"login":"ccoenen","id":124909,"node_id":"MDQ6VXNlcjEyNDkwOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/124909?v=4","gravatar_id":"","url":"https://api.github.com/users/ccoenen","html_url":"https://github.com/ccoenen","followers_url":"https://api.github.com/users/ccoenen/followers","following_url":"https://api.github.com/users/ccoenen/following{/other_user}","gists_url":"https://api.github.com/users/ccoenen/gists{/gist_id}","starred_url":"https://api.github.com/users/ccoenen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccoenen/subscriptions","organizations_url":"https://api.github.com/users/ccoenen/orgs","repos_url":"https://api.github.com/users/ccoenen/repos","events_url":"https://api.github.com/users/ccoenen/events{/privacy}","received_events_url":"https://api.github.com/users/ccoenen/received_events","type":"User","site_admin":false},"body":"The alias'd version takes precedence in other places, so we should do so here as well.\r\n\r\n(the following lines are just a few examples I found quickly)\r\n\r\nhttps://github.com/codimd/server/blob/529075fd67ad0d41ba0b25a7de69817dd4cd76fb/lib/response.js#L185\r\n\r\nhttps://github.com/codimd/server/blob/529075fd67ad0d41ba0b25a7de69817dd4cd76fb/lib/response.js#L202\r\n\r\nhttps://github.com/codimd/server/blob/529075fd67ad0d41ba0b25a7de69817dd4cd76fb/lib/response.js#L249\r\n\r\nhttps://github.com/codimd/server/blob/529075fd67ad0d41ba0b25a7de69817dd4cd76fb/lib/response.js#L253","created_at":"2019-09-05T00:12:10Z","updated_at":"2019-09-05T00:12:10Z","html_url":"https://github.com/codimd/server/pull/170#discussion_r321028285","pull_request_url":"https://api.github.com/repos/codimd/server/pulls/170","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/codimd/server/pulls/comments/321028285"},"html":{"href":"https://github.com/codimd/server/pull/170#discussion_r321028285"},"pull_request":{"href":"https://api.github.com/repos/codimd/server/pulls/170"}},"in_reply_to_id":320707591},"pull_request":{"url":"https://api.github.com/repos/codimd/server/pulls/170","id":313983306,"node_id":"MDExOlB1bGxSZXF1ZXN0MzEzOTgzMzA2","html_url":"https://github.com/codimd/server/pull/170","diff_url":"https://github.com/codimd/server/pull/170.diff","patch_url":"https://github.com/codimd/server/pull/170.patch","issue_url":"https://api.github.com/repos/codimd/server/issues/170","number":170,"state":"open","locked":false,"title":"Added endpoint for note-creation with given alias","user":{"login":"ErikMichelson","id":52606896,"node_id":"MDQ6VXNlcjUyNjA2ODk2","avatar_url":"https://avatars2.githubusercontent.com/u/52606896?v=4","gravatar_id":"","url":"https://api.github.com/users/ErikMichelson","html_url":"https://github.com/ErikMichelson","followers_url":"https://api.github.com/users/ErikMichelson/followers","following_url":"https://api.github.com/users/ErikMichelson/following{/other_user}","gists_url":"https://api.github.com/users/ErikMichelson/gists{/gist_id}","starred_url":"https://api.github.com/users/ErikMichelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErikMichelson/subscriptions","organizations_url":"https://api.github.com/users/ErikMichelson/orgs","repos_url":"https://api.github.com/users/ErikMichelson/repos","events_url":"https://api.github.com/users/ErikMichelson/events{/privacy}","received_events_url":"https://api.github.com/users/ErikMichelson/received_events","type":"User","site_admin":false},"body":"Added a new endpoint `/new/:alias` that allows creation of a note by HTTP-POST with the specified alias.\r\n\r\nSigned-off-by: Erik Michelson <erik@liltv.de>","created_at":"2019-09-04T11:14:53Z","updated_at":"2019-09-05T00:12:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4178d644daa1797e0dd008b590a3f8621edbed7f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1298664506,"node_id":"MDU6TGFiZWwxMjk4NjY0NTA2","url":"https://api.github.com/repos/codimd/server/labels/feature%20request","name":"feature request","color":"0a70b5","default":false}],"milestone":{"url":"https://api.github.com/repos/codimd/server/milestones/2","html_url":"https://github.com/codimd/server/milestone/2","labels_url":"https://api.github.com/repos/codimd/server/milestones/2/labels","id":4348711,"node_id":"MDk6TWlsZXN0b25lNDM0ODcxMQ==","number":2,"title":"Release 1.6.0","description":"","creator":{"login":"SISheogorath","id":8719867,"node_id":"MDQ6VXNlcjg3MTk4Njc=","avatar_url":"https://avatars1.githubusercontent.com/u/8719867?v=4","gravatar_id":"","url":"https://api.github.com/users/SISheogorath","html_url":"https://github.com/SISheogorath","followers_url":"https://api.github.com/users/SISheogorath/followers","following_url":"https://api.github.com/users/SISheogorath/following{/other_user}","gists_url":"https://api.github.com/users/SISheogorath/gists{/gist_id}","starred_url":"https://api.github.com/users/SISheogorath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SISheogorath/subscriptions","organizations_url":"https://api.github.com/users/SISheogorath/orgs","repos_url":"https://api.github.com/users/SISheogorath/repos","events_url":"https://api.github.com/users/SISheogorath/events{/privacy}","received_events_url":"https://api.github.com/users/SISheogorath/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":3,"state":"open","created_at":"2019-05-25T19:03:36Z","updated_at":"2019-09-04T11:31:22Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/codimd/server/pulls/170/commits","review_comments_url":"https://api.github.com/repos/codimd/server/pulls/170/comments","review_comment_url":"https://api.github.com/repos/codimd/server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codimd/server/issues/170/comments","statuses_url":"https://api.github.com/repos/codimd/server/statuses/6e5e6696ad5c336be700641caf94676a281fc181","head":{"label":"ErikMichelson:post-note-url","ref":"post-note-url","sha":"6e5e6696ad5c336be700641caf94676a281fc181","user":{"login":"ErikMichelson","id":52606896,"node_id":"MDQ6VXNlcjUyNjA2ODk2","avatar_url":"https://avatars2.githubusercontent.com/u/52606896?v=4","gravatar_id":"","url":"https://api.github.com/users/ErikMichelson","html_url":"https://github.com/ErikMichelson","followers_url":"https://api.github.com/users/ErikMichelson/followers","following_url":"https://api.github.com/users/ErikMichelson/following{/other_user}","gists_url":"https://api.github.com/users/ErikMichelson/gists{/gist_id}","starred_url":"https://api.github.com/users/ErikMichelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErikMichelson/subscriptions","organizations_url":"https://api.github.com/users/ErikMichelson/orgs","repos_url":"https://api.github.com/users/ErikMichelson/repos","events_url":"https://api.github.com/users/ErikMichelson/events{/privacy}","received_events_url":"https://api.github.com/users/ErikMichelson/received_events","type":"User","site_admin":false},"repo":{"id":206279805,"node_id":"MDEwOlJlcG9zaXRvcnkyMDYyNzk4MDU=","name":"server","full_name":"ErikMichelson/server","private":false,"owner":{"login":"ErikMichelson","id":52606896,"node_id":"MDQ6VXNlcjUyNjA2ODk2","avatar_url":"https://avatars2.githubusercontent.com/u/52606896?v=4","gravatar_id":"","url":"https://api.github.com/users/ErikMichelson","html_url":"https://github.com/ErikMichelson","followers_url":"https://api.github.com/users/ErikMichelson/followers","following_url":"https://api.github.com/users/ErikMichelson/following{/other_user}","gists_url":"https://api.github.com/users/ErikMichelson/gists{/gist_id}","starred_url":"https://api.github.com/users/ErikMichelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErikMichelson/subscriptions","organizations_url":"https://api.github.com/users/ErikMichelson/orgs","repos_url":"https://api.github.com/users/ErikMichelson/repos","events_url":"https://api.github.com/users/ErikMichelson/events{/privacy}","received_events_url":"https://api.github.com/users/ErikMichelson/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ErikMichelson/server","description":"CodiMD - Realtime collaborative markdown notes on all platforms.","fork":true,"url":"https://api.github.com/repos/ErikMichelson/server","forks_url":"https://api.github.com/repos/ErikMichelson/server/forks","keys_url":"https://api.github.com/repos/ErikMichelson/server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ErikMichelson/server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ErikMichelson/server/teams","hooks_url":"https://api.github.com/repos/ErikMichelson/server/hooks","issue_events_url":"https://api.github.com/repos/ErikMichelson/server/issues/events{/number}","events_url":"https://api.github.com/repos/ErikMichelson/server/events","assignees_url":"https://api.github.com/repos/ErikMichelson/server/assignees{/user}","branches_url":"https://api.github.com/repos/ErikMichelson/server/branches{/branch}","tags_url":"https://api.github.com/repos/ErikMichelson/server/tags","blobs_url":"https://api.github.com/repos/ErikMichelson/server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ErikMichelson/server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ErikMichelson/server/git/refs{/sha}","trees_url":"https://api.github.com/repos/ErikMichelson/server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ErikMichelson/server/statuses/{sha}","languages_url":"https://api.github.com/repos/ErikMichelson/server/languages","stargazers_url":"https://api.github.com/repos/ErikMichelson/server/stargazers","contributors_url":"https://api.github.com/repos/ErikMichelson/server/contributors","subscribers_url":"https://api.github.com/repos/ErikMichelson/server/subscribers","subscription_url":"https://api.github.com/repos/ErikMichelson/server/subscription","commits_url":"https://api.github.com/repos/ErikMichelson/server/commits{/sha}","git_commits_url":"https://api.github.com/repos/ErikMichelson/server/git/commits{/sha}","comments_url":"https://api.github.com/repos/ErikMichelson/server/comments{/number}","issue_comment_url":"https://api.github.com/repos/ErikMichelson/server/issues/comments{/number}","contents_url":"https://api.github.com/repos/ErikMichelson/server/contents/{+path}","compare_url":"https://api.github.com/repos/ErikMichelson/server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ErikMichelson/server/merges","archive_url":"https://api.github.com/repos/ErikMichelson/server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ErikMichelson/server/downloads","issues_url":"https://api.github.com/repos/ErikMichelson/server/issues{/number}","pulls_url":"https://api.github.com/repos/ErikMichelson/server/pulls{/number}","milestones_url":"https://api.github.com/repos/ErikMichelson/server/milestones{/number}","notifications_url":"https://api.github.com/repos/ErikMichelson/server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ErikMichelson/server/labels{/name}","releases_url":"https://api.github.com/repos/ErikMichelson/server/releases{/id}","deployments_url":"https://api.github.com/repos/ErikMichelson/server/deployments","created_at":"2019-09-04T09:15:42Z","updated_at":"2019-09-04T09:15:43Z","pushed_at":"2019-09-04T18:25:59Z","git_url":"git://github.com/ErikMichelson/server.git","ssh_url":"git@github.com:ErikMichelson/server.git","clone_url":"https://github.com/ErikMichelson/server.git","svn_url":"https://github.com/ErikMichelson/server","homepage":"https://demo.codimd.org","size":21367,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"codimd:master","ref":"master","sha":"529075fd67ad0d41ba0b25a7de69817dd4cd76fb","user":{"login":"codimd","id":48181221,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MTgxMjIx","avatar_url":"https://avatars0.githubusercontent.com/u/48181221?v=4","gravatar_id":"","url":"https://api.github.com/users/codimd","html_url":"https://github.com/codimd","followers_url":"https://api.github.com/users/codimd/followers","following_url":"https://api.github.com/users/codimd/following{/other_user}","gists_url":"https://api.github.com/users/codimd/gists{/gist_id}","starred_url":"https://api.github.com/users/codimd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codimd/subscriptions","organizations_url":"https://api.github.com/users/codimd/orgs","repos_url":"https://api.github.com/users/codimd/repos","events_url":"https://api.github.com/users/codimd/events{/privacy}","received_events_url":"https://api.github.com/users/codimd/received_events","type":"Organization","site_admin":false},"repo":{"id":177987738,"node_id":"MDEwOlJlcG9zaXRvcnkxNzc5ODc3Mzg=","name":"server","full_name":"codimd/server","private":false,"owner":{"login":"codimd","id":48181221,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MTgxMjIx","avatar_url":"https://avatars0.githubusercontent.com/u/48181221?v=4","gravatar_id":"","url":"https://api.github.com/users/codimd","html_url":"https://github.com/codimd","followers_url":"https://api.github.com/users/codimd/followers","following_url":"https://api.github.com/users/codimd/following{/other_user}","gists_url":"https://api.github.com/users/codimd/gists{/gist_id}","starred_url":"https://api.github.com/users/codimd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codimd/subscriptions","organizations_url":"https://api.github.com/users/codimd/orgs","repos_url":"https://api.github.com/users/codimd/repos","events_url":"https://api.github.com/users/codimd/events{/privacy}","received_events_url":"https://api.github.com/users/codimd/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/codimd/server","description":"CodiMD - Realtime collaborative markdown notes on all platforms.","fork":false,"url":"https://api.github.com/repos/codimd/server","forks_url":"https://api.github.com/repos/codimd/server/forks","keys_url":"https://api.github.com/repos/codimd/server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codimd/server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codimd/server/teams","hooks_url":"https://api.github.com/repos/codimd/server/hooks","issue_events_url":"https://api.github.com/repos/codimd/server/issues/events{/number}","events_url":"https://api.github.com/repos/codimd/server/events","assignees_url":"https://api.github.com/repos/codimd/server/assignees{/user}","branches_url":"https://api.github.com/repos/codimd/server/branches{/branch}","tags_url":"https://api.github.com/repos/codimd/server/tags","blobs_url":"https://api.github.com/repos/codimd/server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codimd/server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codimd/server/git/refs{/sha}","trees_url":"https://api.github.com/repos/codimd/server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codimd/server/statuses/{sha}","languages_url":"https://api.github.com/repos/codimd/server/languages","stargazers_url":"https://api.github.com/repos/codimd/server/stargazers","contributors_url":"https://api.github.com/repos/codimd/server/contributors","subscribers_url":"https://api.github.com/repos/codimd/server/subscribers","subscription_url":"https://api.github.com/repos/codimd/server/subscription","commits_url":"https://api.github.com/repos/codimd/server/commits{/sha}","git_commits_url":"https://api.github.com/repos/codimd/server/git/commits{/sha}","comments_url":"https://api.github.com/repos/codimd/server/comments{/number}","issue_comment_url":"https://api.github.com/repos/codimd/server/issues/comments{/number}","contents_url":"https://api.github.com/repos/codimd/server/contents/{+path}","compare_url":"https://api.github.com/repos/codimd/server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codimd/server/merges","archive_url":"https://api.github.com/repos/codimd/server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codimd/server/downloads","issues_url":"https://api.github.com/repos/codimd/server/issues{/number}","pulls_url":"https://api.github.com/repos/codimd/server/pulls{/number}","milestones_url":"https://api.github.com/repos/codimd/server/milestones{/number}","notifications_url":"https://api.github.com/repos/codimd/server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codimd/server/labels{/name}","releases_url":"https://api.github.com/repos/codimd/server/releases{/id}","deployments_url":"https://api.github.com/repos/codimd/server/deployments","created_at":"2019-03-27T12:14:01Z","updated_at":"2019-09-04T19:15:43Z","pushed_at":"2019-09-04T18:26:00Z","git_url":"git://github.com/codimd/server.git","ssh_url":"git@github.com:codimd/server.git","clone_url":"https://github.com/codimd/server.git","svn_url":"https://github.com/codimd/server","homepage":"https://demo.codimd.org","size":21359,"stargazers_count":260,"watchers_count":260,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":62,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":50,"open_issues":62,"watchers":260,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codimd/server/pulls/170"},"html":{"href":"https://github.com/codimd/server/pull/170"},"issue":{"href":"https://api.github.com/repos/codimd/server/issues/170"},"comments":{"href":"https://api.github.com/repos/codimd/server/issues/170/comments"},"review_comments":{"href":"https://api.github.com/repos/codimd/server/pulls/170/comments"},"review_comment":{"href":"https://api.github.com/repos/codimd/server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codimd/server/pulls/170/commits"},"statuses":{"href":"https://api.github.com/repos/codimd/server/statuses/6e5e6696ad5c336be700641caf94676a281fc181"}},"author_association":"NONE"}}
other: {"actor":{"display_login":"ccoenen"}}