{"action":"opened","number":5,"pull_request":{"url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/pulls/5","id":202245806,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMjQ1ODA2","html_url":"https://github.com/jannolii/discourse-topic-trade-buttons/pull/5","diff_url":"https://github.com/jannolii/discourse-topic-trade-buttons/pull/5.diff","patch_url":"https://github.com/jannolii/discourse-topic-trade-buttons/pull/5.patch","issue_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/issues/5","number":5,"state":"open","locked":false,"title":"Fix when unchecking button from category settings","user":{"login":"trobiyo","id":29449542,"node_id":"MDQ6VXNlcjI5NDQ5NTQy","avatar_url":"https://avatars2.githubusercontent.com/u/29449542?v=4","gravatar_id":"","url":"https://api.github.com/users/trobiyo","html_url":"https://github.com/trobiyo","followers_url":"https://api.github.com/users/trobiyo/followers","following_url":"https://api.github.com/users/trobiyo/following{/other_user}","gists_url":"https://api.github.com/users/trobiyo/gists{/gist_id}","starred_url":"https://api.github.com/users/trobiyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trobiyo/subscriptions","organizations_url":"https://api.github.com/users/trobiyo/orgs","repos_url":"https://api.github.com/users/trobiyo/repos","events_url":"https://api.github.com/users/trobiyo/events{/privacy}","received_events_url":"https://api.github.com/users/trobiyo/received_events","type":"User","site_admin":false},"body":"Taking a look to the values of every variable, for instance, under the function canTopicBeMarkedAsCancelled, I realized that the return statement was returning a misleading value.\r\n\r\nContext:\r\n- Enable the plugin and enable Sold and Cancelled buttons under some random category.\r\n- Then try to uncheck Cancelled button from that category. You will see that the button Cancelled still appears.\r\n\r\nThe error comes from extend-topic-for-sold-button.js.es6, at the time of defining the variable ```const enable_cancelled_button``` (it affects to all of the buttons, but I will focus on this). The thing is that at the time of executing the return statement, all '&&' returns true, because enable_cancelled_button is a string (which its value is \"false\").\r\n\r\nIf more info about the logs is needed, please let me know.","created_at":"2018-07-18T13:03:28Z","updated_at":"2018-07-18T13:03:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/pulls/5/commits","review_comments_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/pulls/5/comments","review_comment_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/issues/5/comments","statuses_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/statuses/46e3b95c22bd491b3eecd4b337c6cc3a1042360f","head":{"label":"trobiyo:master","ref":"master","sha":"46e3b95c22bd491b3eecd4b337c6cc3a1042360f","user":{"login":"trobiyo","id":29449542,"node_id":"MDQ6VXNlcjI5NDQ5NTQy","avatar_url":"https://avatars2.githubusercontent.com/u/29449542?v=4","gravatar_id":"","url":"https://api.github.com/users/trobiyo","html_url":"https://github.com/trobiyo","followers_url":"https://api.github.com/users/trobiyo/followers","following_url":"https://api.github.com/users/trobiyo/following{/other_user}","gists_url":"https://api.github.com/users/trobiyo/gists{/gist_id}","starred_url":"https://api.github.com/users/trobiyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trobiyo/subscriptions","organizations_url":"https://api.github.com/users/trobiyo/orgs","repos_url":"https://api.github.com/users/trobiyo/repos","events_url":"https://api.github.com/users/trobiyo/events{/privacy}","received_events_url":"https://api.github.com/users/trobiyo/received_events","type":"User","site_admin":false},"repo":{"id":141434315,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE0MzQzMTU=","name":"discourse-topic-trade-buttons","full_name":"trobiyo/discourse-topic-trade-buttons","owner":{"login":"trobiyo","id":29449542,"node_id":"MDQ6VXNlcjI5NDQ5NTQy","avatar_url":"https://avatars2.githubusercontent.com/u/29449542?v=4","gravatar_id":"","url":"https://api.github.com/users/trobiyo","html_url":"https://github.com/trobiyo","followers_url":"https://api.github.com/users/trobiyo/followers","following_url":"https://api.github.com/users/trobiyo/following{/other_user}","gists_url":"https://api.github.com/users/trobiyo/gists{/gist_id}","starred_url":"https://api.github.com/users/trobiyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trobiyo/subscriptions","organizations_url":"https://api.github.com/users/trobiyo/orgs","repos_url":"https://api.github.com/users/trobiyo/repos","events_url":"https://api.github.com/users/trobiyo/events{/privacy}","received_events_url":"https://api.github.com/users/trobiyo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trobiyo/discourse-topic-trade-buttons","description":null,"fork":true,"url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons","forks_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/forks","keys_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/teams","hooks_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/hooks","issue_events_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/issues/events{/number}","events_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/events","assignees_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/assignees{/user}","branches_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/branches{/branch}","tags_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/tags","blobs_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/git/refs{/sha}","trees_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/statuses/{sha}","languages_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/languages","stargazers_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/stargazers","contributors_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/contributors","subscribers_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/subscribers","subscription_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/subscription","commits_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/commits{/sha}","git_commits_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/git/commits{/sha}","comments_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/comments{/number}","issue_comment_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/issues/comments{/number}","contents_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/contents/{+path}","compare_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/merges","archive_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/downloads","issues_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/issues{/number}","pulls_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/pulls{/number}","milestones_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/milestones{/number}","notifications_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/labels{/name}","releases_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/releases{/id}","deployments_url":"https://api.github.com/repos/trobiyo/discourse-topic-trade-buttons/deployments","created_at":"2018-07-18T12:51:23Z","updated_at":"2018-07-18T13:02:04Z","pushed_at":"2018-07-18T13:02:03Z","git_url":"git://github.com/trobiyo/discourse-topic-trade-buttons.git","ssh_url":"git@github.com:trobiyo/discourse-topic-trade-buttons.git","clone_url":"https://github.com/trobiyo/discourse-topic-trade-buttons.git","svn_url":"https://github.com/trobiyo/discourse-topic-trade-buttons","homepage":null,"size":14,"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,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jannolii:master","ref":"master","sha":"d92def8dc304223f6ff65ad93492c1ebcb210847","user":{"login":"jannolii","id":1211014,"node_id":"MDQ6VXNlcjEyMTEwMTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1211014?v=4","gravatar_id":"","url":"https://api.github.com/users/jannolii","html_url":"https://github.com/jannolii","followers_url":"https://api.github.com/users/jannolii/followers","following_url":"https://api.github.com/users/jannolii/following{/other_user}","gists_url":"https://api.github.com/users/jannolii/gists{/gist_id}","starred_url":"https://api.github.com/users/jannolii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jannolii/subscriptions","organizations_url":"https://api.github.com/users/jannolii/orgs","repos_url":"https://api.github.com/users/jannolii/repos","events_url":"https://api.github.com/users/jannolii/events{/privacy}","received_events_url":"https://api.github.com/users/jannolii/received_events","type":"User","site_admin":false},"repo":{"id":85415623,"node_id":"MDEwOlJlcG9zaXRvcnk4NTQxNTYyMw==","name":"discourse-topic-trade-buttons","full_name":"jannolii/discourse-topic-trade-buttons","owner":{"login":"jannolii","id":1211014,"node_id":"MDQ6VXNlcjEyMTEwMTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1211014?v=4","gravatar_id":"","url":"https://api.github.com/users/jannolii","html_url":"https://github.com/jannolii","followers_url":"https://api.github.com/users/jannolii/followers","following_url":"https://api.github.com/users/jannolii/following{/other_user}","gists_url":"https://api.github.com/users/jannolii/gists{/gist_id}","starred_url":"https://api.github.com/users/jannolii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jannolii/subscriptions","organizations_url":"https://api.github.com/users/jannolii/orgs","repos_url":"https://api.github.com/users/jannolii/repos","events_url":"https://api.github.com/users/jannolii/events{/privacy}","received_events_url":"https://api.github.com/users/jannolii/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jannolii/discourse-topic-trade-buttons","description":null,"fork":false,"url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons","forks_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/forks","keys_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/teams","hooks_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/hooks","issue_events_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/issues/events{/number}","events_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/events","assignees_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/assignees{/user}","branches_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/branches{/branch}","tags_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/tags","blobs_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/git/refs{/sha}","trees_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/statuses/{sha}","languages_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/languages","stargazers_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/stargazers","contributors_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/contributors","subscribers_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/subscribers","subscription_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/subscription","commits_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/commits{/sha}","git_commits_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/git/commits{/sha}","comments_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/comments{/number}","issue_comment_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/issues/comments{/number}","contents_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/contents/{+path}","compare_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/merges","archive_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/downloads","issues_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/issues{/number}","pulls_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/pulls{/number}","milestones_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/milestones{/number}","notifications_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/labels{/name}","releases_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/releases{/id}","deployments_url":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/deployments","created_at":"2017-03-18T16:28:35Z","updated_at":"2017-03-19T20:53:46Z","pushed_at":"2017-10-15T06:44:42Z","git_url":"git://github.com/jannolii/discourse-topic-trade-buttons.git","ssh_url":"git@github.com:jannolii/discourse-topic-trade-buttons.git","clone_url":"https://github.com/jannolii/discourse-topic-trade-buttons.git","svn_url":"https://github.com/jannolii/discourse-topic-trade-buttons","homepage":null,"size":14,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/pulls/5"},"html":{"href":"https://github.com/jannolii/discourse-topic-trade-buttons/pull/5"},"issue":{"href":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/issues/5"},"comments":{"href":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/jannolii/discourse-topic-trade-buttons/statuses/46e3b95c22bd491b3eecd4b337c6cc3a1042360f"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":4,"deletions":4,"changed_files":1}}
{"actor":{"display_login":"trobiyo"}}