{"action":"opened","number":9320,"pull_request":{"url":"https://api.github.com/repos/HabitRPG/habitica/pulls/9320","id":149398975,"html_url":"https://github.com/HabitRPG/habitica/pull/9320","diff_url":"https://github.com/HabitRPG/habitica/pull/9320.diff","patch_url":"https://github.com/HabitRPG/habitica/pull/9320.patch","issue_url":"https://api.github.com/repos/HabitRPG/habitica/issues/9320","number":9320,"state":"open","locked":false,"title":"[WIP] Regenerate api token Fixes issue #9256 ","user":{"login":"TNychka","id":8963665,"avatar_url":"https://avatars2.githubusercontent.com/u/8963665?v=4","gravatar_id":"","url":"https://api.github.com/users/TNychka","html_url":"https://github.com/TNychka","followers_url":"https://api.github.com/users/TNychka/followers","following_url":"https://api.github.com/users/TNychka/following{/other_user}","gists_url":"https://api.github.com/users/TNychka/gists{/gist_id}","starred_url":"https://api.github.com/users/TNychka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TNychka/subscriptions","organizations_url":"https://api.github.com/users/TNychka/orgs","repos_url":"https://api.github.com/users/TNychka/repos","events_url":"https://api.github.com/users/TNychka/events{/privacy}","received_events_url":"https://api.github.com/users/TNychka/received_events","type":"User","site_admin":false},"body":"[//]: # (Note: See http://habitica.wikia.com/wiki/Using_Habitica_Git#Pull_Request for more info)\r\n\r\n[//]: # (Put Issue # or URL here, if applicable. This will automatically close the issue if your PR is merged in)\r\nhttps://github.com/HabitRPG/habitica/issues/9256\r\n\r\n### Changes\r\n[//]: # (Describe the changes that were made in detail here. Include pictures if necessary)\r\n\r\n**Complete**\r\n- Added button under API tab of user profile to reset their API token\r\n- Added backend code to accept API token reset requests\r\n- Added (English) translations for warning messages\r\n\r\n**In-progess (Need resources/plan)**\r\n- Confirmation that the provided dialog is final (see alys's comment on the issue https://github.com/HabitRPG/habitica/issues/9256)\r\n- Non-English translations for added lines\r\n- Review of endpoint /user/auth/reset-api-token\r\n- Tests\r\n- Review of front-end design\r\n\r\n**Design Below**\r\n\r\nAdds reset api button to user's api page\r\n![screenshot_2017-10-29_14-15-07](https://user-images.githubusercontent.com/8963665/32146830-e669aee8-bcb3-11e7-86e9-b490359766ed.png)\r\nAfter clicking, the following warning appears\r\n![screenshot_2017-10-29_14-15-55](https://user-images.githubusercontent.com/8963665/32146834-e90fcbe6-bcb3-11e7-990f-5a0a540b9258.png)\r\nAfter accepting this, the user is logged out. After logging back in note the API token has changed.\r\n![screenshot_2017-10-29_14-16-45](https://user-images.githubusercontent.com/8963665/32146836-ea17857e-bcb3-11e7-8f00-63f8a0eb9b9c.png)\r\n\r\n[//]: # (Put User ID in here - found in Settings -> API)\r\n\r\n----\r\nUUID: f57bd235-ec21-4357-b5c9-a0536294b285\r\n","created_at":"2017-10-29T18:21:39Z","updated_at":"2017-10-29T18:21:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/HabitRPG/habitica/pulls/9320/commits","review_comments_url":"https://api.github.com/repos/HabitRPG/habitica/pulls/9320/comments","review_comment_url":"https://api.github.com/repos/HabitRPG/habitica/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HabitRPG/habitica/issues/9320/comments","statuses_url":"https://api.github.com/repos/HabitRPG/habitica/statuses/34f3fec0b2906d472c3342fe27c981254e3cf8a6","head":{"label":"TNychka:#9256RegenerateAPIToken","ref":"#9256RegenerateAPIToken","sha":"34f3fec0b2906d472c3342fe27c981254e3cf8a6","user":{"login":"TNychka","id":8963665,"avatar_url":"https://avatars2.githubusercontent.com/u/8963665?v=4","gravatar_id":"","url":"https://api.github.com/users/TNychka","html_url":"https://github.com/TNychka","followers_url":"https://api.github.com/users/TNychka/followers","following_url":"https://api.github.com/users/TNychka/following{/other_user}","gists_url":"https://api.github.com/users/TNychka/gists{/gist_id}","starred_url":"https://api.github.com/users/TNychka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TNychka/subscriptions","organizations_url":"https://api.github.com/users/TNychka/orgs","repos_url":"https://api.github.com/users/TNychka/repos","events_url":"https://api.github.com/users/TNychka/events{/privacy}","received_events_url":"https://api.github.com/users/TNychka/received_events","type":"User","site_admin":false},"repo":{"id":86759996,"name":"habitica","full_name":"TNychka/habitica","owner":{"login":"TNychka","id":8963665,"avatar_url":"https://avatars2.githubusercontent.com/u/8963665?v=4","gravatar_id":"","url":"https://api.github.com/users/TNychka","html_url":"https://github.com/TNychka","followers_url":"https://api.github.com/users/TNychka/followers","following_url":"https://api.github.com/users/TNychka/following{/other_user}","gists_url":"https://api.github.com/users/TNychka/gists{/gist_id}","starred_url":"https://api.github.com/users/TNychka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TNychka/subscriptions","organizations_url":"https://api.github.com/users/TNychka/orgs","repos_url":"https://api.github.com/users/TNychka/repos","events_url":"https://api.github.com/users/TNychka/events{/privacy}","received_events_url":"https://api.github.com/users/TNychka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TNychka/habitica","description":"A habit tracker app which treats your goals like a Role Playing Game.","fork":true,"url":"https://api.github.com/repos/TNychka/habitica","forks_url":"https://api.github.com/repos/TNychka/habitica/forks","keys_url":"https://api.github.com/repos/TNychka/habitica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TNychka/habitica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TNychka/habitica/teams","hooks_url":"https://api.github.com/repos/TNychka/habitica/hooks","issue_events_url":"https://api.github.com/repos/TNychka/habitica/issues/events{/number}","events_url":"https://api.github.com/repos/TNychka/habitica/events","assignees_url":"https://api.github.com/repos/TNychka/habitica/assignees{/user}","branches_url":"https://api.github.com/repos/TNychka/habitica/branches{/branch}","tags_url":"https://api.github.com/repos/TNychka/habitica/tags","blobs_url":"https://api.github.com/repos/TNychka/habitica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TNychka/habitica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TNychka/habitica/git/refs{/sha}","trees_url":"https://api.github.com/repos/TNychka/habitica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TNychka/habitica/statuses/{sha}","languages_url":"https://api.github.com/repos/TNychka/habitica/languages","stargazers_url":"https://api.github.com/repos/TNychka/habitica/stargazers","contributors_url":"https://api.github.com/repos/TNychka/habitica/contributors","subscribers_url":"https://api.github.com/repos/TNychka/habitica/subscribers","subscription_url":"https://api.github.com/repos/TNychka/habitica/subscription","commits_url":"https://api.github.com/repos/TNychka/habitica/commits{/sha}","git_commits_url":"https://api.github.com/repos/TNychka/habitica/git/commits{/sha}","comments_url":"https://api.github.com/repos/TNychka/habitica/comments{/number}","issue_comment_url":"https://api.github.com/repos/TNychka/habitica/issues/comments{/number}","contents_url":"https://api.github.com/repos/TNychka/habitica/contents/{+path}","compare_url":"https://api.github.com/repos/TNychka/habitica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TNychka/habitica/merges","archive_url":"https://api.github.com/repos/TNychka/habitica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TNychka/habitica/downloads","issues_url":"https://api.github.com/repos/TNychka/habitica/issues{/number}","pulls_url":"https://api.github.com/repos/TNychka/habitica/pulls{/number}","milestones_url":"https://api.github.com/repos/TNychka/habitica/milestones{/number}","notifications_url":"https://api.github.com/repos/TNychka/habitica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TNychka/habitica/labels{/name}","releases_url":"https://api.github.com/repos/TNychka/habitica/releases{/id}","deployments_url":"https://api.github.com/repos/TNychka/habitica/deployments","created_at":"2017-03-31T00:00:54Z","updated_at":"2017-03-31T00:01:07Z","pushed_at":"2017-10-29T18:06:57Z","git_url":"git://github.com/TNychka/habitica.git","ssh_url":"git@github.com:TNychka/habitica.git","clone_url":"https://github.com/TNychka/habitica.git","svn_url":"https://github.com/TNychka/habitica","homepage":"https://habitica.com","size":737146,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"HabitRPG:develop","ref":"develop","sha":"bea813b318f7f0a27e641203190dfb4f193daf82","user":{"login":"HabitRPG","id":3834775,"avatar_url":"https://avatars3.githubusercontent.com/u/3834775?v=4","gravatar_id":"","url":"https://api.github.com/users/HabitRPG","html_url":"https://github.com/HabitRPG","followers_url":"https://api.github.com/users/HabitRPG/followers","following_url":"https://api.github.com/users/HabitRPG/following{/other_user}","gists_url":"https://api.github.com/users/HabitRPG/gists{/gist_id}","starred_url":"https://api.github.com/users/HabitRPG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HabitRPG/subscriptions","organizations_url":"https://api.github.com/users/HabitRPG/orgs","repos_url":"https://api.github.com/users/HabitRPG/repos","events_url":"https://api.github.com/users/HabitRPG/events{/privacy}","received_events_url":"https://api.github.com/users/HabitRPG/received_events","type":"Organization","site_admin":false},"repo":{"id":4578898,"name":"habitica","full_name":"HabitRPG/habitica","owner":{"login":"HabitRPG","id":3834775,"avatar_url":"https://avatars3.githubusercontent.com/u/3834775?v=4","gravatar_id":"","url":"https://api.github.com/users/HabitRPG","html_url":"https://github.com/HabitRPG","followers_url":"https://api.github.com/users/HabitRPG/followers","following_url":"https://api.github.com/users/HabitRPG/following{/other_user}","gists_url":"https://api.github.com/users/HabitRPG/gists{/gist_id}","starred_url":"https://api.github.com/users/HabitRPG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HabitRPG/subscriptions","organizations_url":"https://api.github.com/users/HabitRPG/orgs","repos_url":"https://api.github.com/users/HabitRPG/repos","events_url":"https://api.github.com/users/HabitRPG/events{/privacy}","received_events_url":"https://api.github.com/users/HabitRPG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HabitRPG/habitica","description":"A habit tracker app which treats your goals like a Role Playing Game.","fork":false,"url":"https://api.github.com/repos/HabitRPG/habitica","forks_url":"https://api.github.com/repos/HabitRPG/habitica/forks","keys_url":"https://api.github.com/repos/HabitRPG/habitica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HabitRPG/habitica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HabitRPG/habitica/teams","hooks_url":"https://api.github.com/repos/HabitRPG/habitica/hooks","issue_events_url":"https://api.github.com/repos/HabitRPG/habitica/issues/events{/number}","events_url":"https://api.github.com/repos/HabitRPG/habitica/events","assignees_url":"https://api.github.com/repos/HabitRPG/habitica/assignees{/user}","branches_url":"https://api.github.com/repos/HabitRPG/habitica/branches{/branch}","tags_url":"https://api.github.com/repos/HabitRPG/habitica/tags","blobs_url":"https://api.github.com/repos/HabitRPG/habitica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HabitRPG/habitica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HabitRPG/habitica/git/refs{/sha}","trees_url":"https://api.github.com/repos/HabitRPG/habitica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HabitRPG/habitica/statuses/{sha}","languages_url":"https://api.github.com/repos/HabitRPG/habitica/languages","stargazers_url":"https://api.github.com/repos/HabitRPG/habitica/stargazers","contributors_url":"https://api.github.com/repos/HabitRPG/habitica/contributors","subscribers_url":"https://api.github.com/repos/HabitRPG/habitica/subscribers","subscription_url":"https://api.github.com/repos/HabitRPG/habitica/subscription","commits_url":"https://api.github.com/repos/HabitRPG/habitica/commits{/sha}","git_commits_url":"https://api.github.com/repos/HabitRPG/habitica/git/commits{/sha}","comments_url":"https://api.github.com/repos/HabitRPG/habitica/comments{/number}","issue_comment_url":"https://api.github.com/repos/HabitRPG/habitica/issues/comments{/number}","contents_url":"https://api.github.com/repos/HabitRPG/habitica/contents/{+path}","compare_url":"https://api.github.com/repos/HabitRPG/habitica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HabitRPG/habitica/merges","archive_url":"https://api.github.com/repos/HabitRPG/habitica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HabitRPG/habitica/downloads","issues_url":"https://api.github.com/repos/HabitRPG/habitica/issues{/number}","pulls_url":"https://api.github.com/repos/HabitRPG/habitica/pulls{/number}","milestones_url":"https://api.github.com/repos/HabitRPG/habitica/milestones{/number}","notifications_url":"https://api.github.com/repos/HabitRPG/habitica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HabitRPG/habitica/labels{/name}","releases_url":"https://api.github.com/repos/HabitRPG/habitica/releases{/id}","deployments_url":"https://api.github.com/repos/HabitRPG/habitica/deployments","created_at":"2012-06-06T22:49:48Z","updated_at":"2017-10-29T18:16:37Z","pushed_at":"2017-10-29T15:14:16Z","git_url":"git://github.com/HabitRPG/habitica.git","ssh_url":"git@github.com:HabitRPG/habitica.git","clone_url":"https://github.com/HabitRPG/habitica.git","svn_url":"https://github.com/HabitRPG/habitica","homepage":"https://habitica.com","size":738567,"stargazers_count":5358,"watchers_count":5358,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2378,"mirror_url":null,"archived":false,"open_issues_count":349,"forks":2378,"open_issues":349,"watchers":5358,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/HabitRPG/habitica/pulls/9320"},"html":{"href":"https://github.com/HabitRPG/habitica/pull/9320"},"issue":{"href":"https://api.github.com/repos/HabitRPG/habitica/issues/9320"},"comments":{"href":"https://api.github.com/repos/HabitRPG/habitica/issues/9320/comments"},"review_comments":{"href":"https://api.github.com/repos/HabitRPG/habitica/pulls/9320/comments"},"review_comment":{"href":"https://api.github.com/repos/HabitRPG/habitica/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HabitRPG/habitica/pulls/9320/commits"},"statuses":{"href":"https://api.github.com/repos/HabitRPG/habitica/statuses/34f3fec0b2906d472c3342fe27c981254e3cf8a6"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":47,"deletions":1,"changed_files":4}}
{"actor":{"display_login":"TNychka"}}