{"action":"created","comment":{"url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls/comments/61720950","id":61720950,"diff_hunk":"@@ -0,0 +1,33 @@\n+const $ = require(\"jquery\");\n+\n+$(document).ready(function () {\n+    let apiKey = $(\"#api-key\");\n+    if (apiKey) {  // Only when key is displayed (user is viewing their own page)\n+\n+        // Not showing confirmation dialog if there's no active key (key value is not displayed).\n+        let ignoreConfirmation = apiKey.css(\"display\") === \"none\";\n+\n+        $(\"#btn-generate-api-key\").click(function () {\n+            if (ignoreConfirmation || confirm('Are you sure you want to generate new API key?\\n' +","path":"webserver/static/scripts/profile.js","position":11,"original_position":11,"commit_id":"1beab14c5728f2367f8c2c2634bd098f973c22da","original_commit_id":"1beab14c5728f2367f8c2c2634bd098f973c22da","user":{"login":"gentlecat","id":460525,"avatar_url":"https://avatars.githubusercontent.com/u/460525?v=3","gravatar_id":"","url":"https://api.github.com/users/gentlecat","html_url":"https://github.com/gentlecat","followers_url":"https://api.github.com/users/gentlecat/followers","following_url":"https://api.github.com/users/gentlecat/following{/other_user}","gists_url":"https://api.github.com/users/gentlecat/gists{/gist_id}","starred_url":"https://api.github.com/users/gentlecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gentlecat/subscriptions","organizations_url":"https://api.github.com/users/gentlecat/orgs","repos_url":"https://api.github.com/users/gentlecat/repos","events_url":"https://api.github.com/users/gentlecat/events{/privacy}","received_events_url":"https://api.github.com/users/gentlecat/received_events","type":"User","site_admin":false},"body":"Can also remove it completely and just send the request.","created_at":"2016-05-02T09:45:08Z","updated_at":"2016-05-02T09:45:08Z","html_url":"https://github.com/metabrainz/acousticbrainz-server/pull/181#discussion_r61720950","pull_request_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls/181","_links":{"self":{"href":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls/comments/61720950"},"html":{"href":"https://github.com/metabrainz/acousticbrainz-server/pull/181#discussion_r61720950"},"pull_request":{"href":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls/181"}}},"pull_request":{"url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls/181","id":66853084,"html_url":"https://github.com/metabrainz/acousticbrainz-server/pull/181","diff_url":"https://github.com/metabrainz/acousticbrainz-server/pull/181.diff","patch_url":"https://github.com/metabrainz/acousticbrainz-server/pull/181.patch","issue_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/issues/181","number":181,"state":"open","locked":false,"title":"API key generation","user":{"login":"gentlecat","id":460525,"avatar_url":"https://avatars.githubusercontent.com/u/460525?v=3","gravatar_id":"","url":"https://api.github.com/users/gentlecat","html_url":"https://github.com/gentlecat","followers_url":"https://api.github.com/users/gentlecat/followers","following_url":"https://api.github.com/users/gentlecat/following{/other_user}","gists_url":"https://api.github.com/users/gentlecat/gists{/gist_id}","starred_url":"https://api.github.com/users/gentlecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gentlecat/subscriptions","organizations_url":"https://api.github.com/users/gentlecat/orgs","repos_url":"https://api.github.com/users/gentlecat/repos","events_url":"https://api.github.com/users/gentlecat/events{/privacy}","received_events_url":"https://api.github.com/users/gentlecat/received_events","type":"User","site_admin":false},"body":"New table and UI.","created_at":"2016-04-18T13:28:52Z","updated_at":"2016-05-02T09:45:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"094bf48e651713059876993d1ca49970d3a4cdca","assignee":{"login":"alastair","id":19217,"avatar_url":"https://avatars.githubusercontent.com/u/19217?v=3","gravatar_id":"","url":"https://api.github.com/users/alastair","html_url":"https://github.com/alastair","followers_url":"https://api.github.com/users/alastair/followers","following_url":"https://api.github.com/users/alastair/following{/other_user}","gists_url":"https://api.github.com/users/alastair/gists{/gist_id}","starred_url":"https://api.github.com/users/alastair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alastair/subscriptions","organizations_url":"https://api.github.com/users/alastair/orgs","repos_url":"https://api.github.com/users/alastair/repos","events_url":"https://api.github.com/users/alastair/events{/privacy}","received_events_url":"https://api.github.com/users/alastair/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls/181/commits","review_comments_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls/181/comments","review_comment_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/issues/181/comments","statuses_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/statuses/1beab14c5728f2367f8c2c2634bd098f973c22da","head":{"label":"metabrainz:api-key","ref":"api-key","sha":"1beab14c5728f2367f8c2c2634bd098f973c22da","user":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"repo":{"id":24893738,"name":"acousticbrainz-server","full_name":"metabrainz/acousticbrainz-server","owner":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metabrainz/acousticbrainz-server","description":"The server components for the AcousticBrainz project","fork":false,"url":"https://api.github.com/repos/metabrainz/acousticbrainz-server","forks_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/forks","keys_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/teams","hooks_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/hooks","issue_events_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/issues/events{/number}","events_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/events","assignees_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/assignees{/user}","branches_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/branches{/branch}","tags_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/tags","blobs_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/statuses/{sha}","languages_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/languages","stargazers_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/stargazers","contributors_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/contributors","subscribers_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/subscribers","subscription_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/subscription","commits_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/contents/{+path}","compare_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/merges","archive_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/downloads","issues_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/issues{/number}","pulls_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls{/number}","milestones_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/milestones{/number}","notifications_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/labels{/name}","releases_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/releases{/id}","deployments_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/deployments","created_at":"2014-10-07T14:22:44Z","updated_at":"2016-04-26T11:10:58Z","pushed_at":"2016-04-30T20:45:34Z","git_url":"git://github.com/metabrainz/acousticbrainz-server.git","ssh_url":"git@github.com:metabrainz/acousticbrainz-server.git","clone_url":"https://github.com/metabrainz/acousticbrainz-server.git","svn_url":"https://github.com/metabrainz/acousticbrainz-server","homepage":"https://acousticbrainz.org/","size":2156,"stargazers_count":37,"watchers_count":37,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":25,"forks":18,"open_issues":25,"watchers":37,"default_branch":"master"}},"base":{"label":"metabrainz:master","ref":"master","sha":"baf9e66f6b317c931b58eeb776a9e5f9581d8246","user":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"repo":{"id":24893738,"name":"acousticbrainz-server","full_name":"metabrainz/acousticbrainz-server","owner":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metabrainz/acousticbrainz-server","description":"The server components for the AcousticBrainz project","fork":false,"url":"https://api.github.com/repos/metabrainz/acousticbrainz-server","forks_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/forks","keys_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/teams","hooks_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/hooks","issue_events_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/issues/events{/number}","events_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/events","assignees_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/assignees{/user}","branches_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/branches{/branch}","tags_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/tags","blobs_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/statuses/{sha}","languages_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/languages","stargazers_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/stargazers","contributors_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/contributors","subscribers_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/subscribers","subscription_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/subscription","commits_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/contents/{+path}","compare_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/merges","archive_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/downloads","issues_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/issues{/number}","pulls_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls{/number}","milestones_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/milestones{/number}","notifications_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/labels{/name}","releases_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/releases{/id}","deployments_url":"https://api.github.com/repos/metabrainz/acousticbrainz-server/deployments","created_at":"2014-10-07T14:22:44Z","updated_at":"2016-04-26T11:10:58Z","pushed_at":"2016-04-30T20:45:34Z","git_url":"git://github.com/metabrainz/acousticbrainz-server.git","ssh_url":"git@github.com:metabrainz/acousticbrainz-server.git","clone_url":"https://github.com/metabrainz/acousticbrainz-server.git","svn_url":"https://github.com/metabrainz/acousticbrainz-server","homepage":"https://acousticbrainz.org/","size":2156,"stargazers_count":37,"watchers_count":37,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":25,"forks":18,"open_issues":25,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls/181"},"html":{"href":"https://github.com/metabrainz/acousticbrainz-server/pull/181"},"issue":{"href":"https://api.github.com/repos/metabrainz/acousticbrainz-server/issues/181"},"comments":{"href":"https://api.github.com/repos/metabrainz/acousticbrainz-server/issues/181/comments"},"review_comments":{"href":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls/181/comments"},"review_comment":{"href":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metabrainz/acousticbrainz-server/pulls/181/commits"},"statuses":{"href":"https://api.github.com/repos/metabrainz/acousticbrainz-server/statuses/1beab14c5728f2367f8c2c2634bd098f973c22da"}}}}