{"action":"closed","number":676,"pull_request":{"url":"https://api.github.com/repos/atom/settings-view/pulls/676","id":46749640,"html_url":"https://github.com/atom/settings-view/pull/676","diff_url":"https://github.com/atom/settings-view/pull/676.diff","patch_url":"https://github.com/atom/settings-view/pull/676.patch","issue_url":"https://api.github.com/repos/atom/settings-view/issues/676","number":676,"state":"closed","locked":false,"title":"Show settings button on package cards for packages with grammars","user":{"login":"izuzak","id":38924,"avatar_url":"https://avatars.githubusercontent.com/u/38924?v=3","gravatar_id":"","url":"https://api.github.com/users/izuzak","html_url":"https://github.com/izuzak","followers_url":"https://api.github.com/users/izuzak/followers","following_url":"https://api.github.com/users/izuzak/following{/other_user}","gists_url":"https://api.github.com/users/izuzak/gists{/gist_id}","starred_url":"https://api.github.com/users/izuzak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izuzak/subscriptions","organizations_url":"https://api.github.com/users/izuzak/orgs","repos_url":"https://api.github.com/users/izuzak/repos","events_url":"https://api.github.com/users/izuzak/events{/privacy}","received_events_url":"https://api.github.com/users/izuzak/received_events","type":"User","site_admin":true},"body":"This is an attempt to close https://github.com/atom/settings-view/issues/645. \r\n\r\nThe problem with that package is that it doesn't have any config settings of it own, but it [does define a grammar](https://github.com/sindresorhus/atom-editorconfig/tree/master/grammars) so it has scoped settings as any other language package.\r\n\r\n* 2af57d1 adds a failing spec to demonstrate the problem with the `packageHasSettings` method:\r\n\r\n  ```\r\npackage manager\r\n  ::packageHasSettings\r\n    it returns true when the pacakge does not have config, but does define language grammars\r\n      Expected false to be true. (spec/package-manager-spec.coffee:191:64)\r\n```\r\n\r\n* 9842dd1 modifies `packageHasSettings` so that it returns `true` if a grammar was loaded from that package, using a similar approach as in [`PackageGrammarsView.getPackageGrammars`](https://github.com/atom/settings-view/blob/cb09a2d80fcab4c91b3cf47e7d6fe02174a4b1c0/lib/package-grammars-view.coffee#L27-L29)\r\n\r\n  ```\r\nFinished in 21.308 seconds\r\n134 tests, 505 assertions, 0 failures, 0 skipped\r\n```\r\n\r\nWith this change, all packages which define a grammar will have a \"Settings\" button on the package card, which I think is good since those packages do have (scoped) settings.\r\n\r\ncc @benogle (I noticed you made [some changes in this area](https://github.com/atom/settings-view/commit/e5069ac4617ee065a9eefb788da8da1496a77548) a few months back, @thedaniel @kevinsawicki for :thought_balloon: \r\n\r\nBefore:\r\n\r\n<img width=\"670\" alt=\"screen shot 2015-10-05 at 09 05 34\" src=\"https://cloud.githubusercontent.com/assets/38924/10274653/55c5c884-6b40-11e5-8545-d804442fd03e.png\">\r\n<img width=\"669\" alt=\"screen shot 2015-10-05 at 09 05 59\" src=\"https://cloud.githubusercontent.com/assets/38924/10274654/55c6c9dc-6b40-11e5-9705-45d86d5b2c3e.png\">\r\n\r\nAfter:\r\n\r\n<img width=\"687\" alt=\"screen shot 2015-10-05 at 09 04 15\" src=\"https://cloud.githubusercontent.com/assets/38924/10274623/1ee3e580-6b40-11e5-91f1-dfecae28314b.png\">\r\n<img width=\"671\" alt=\"screen shot 2015-10-05 at 09 04 31\" src=\"https://cloud.githubusercontent.com/assets/38924/10274624/1ee3fa84-6b40-11e5-8dc9-211fe76f2f52.png\">","created_at":"2015-10-05T07:11:00Z","updated_at":"2015-10-09T10:20:18Z","closed_at":"2015-10-09T10:20:18Z","merged_at":"2015-10-09T10:20:18Z","merge_commit_sha":"7e16c39115118d40d0b27fef1f7940717d1289f2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atom/settings-view/pulls/676/commits","review_comments_url":"https://api.github.com/repos/atom/settings-view/pulls/676/comments","review_comment_url":"https://api.github.com/repos/atom/settings-view/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/settings-view/issues/676/comments","statuses_url":"https://api.github.com/repos/atom/settings-view/statuses/1a29c2d38559d236e5f3aab7597b252037972766","head":{"label":"atom:iz-show-settings-button-on-card-for-lang-packages","ref":"iz-show-settings-button-on-card-for-lang-packages","sha":"1a29c2d38559d236e5f3aab7597b252037972766","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":12090329,"name":"settings-view","full_name":"atom/settings-view","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/settings-view","description":"Edit Atom settings","fork":false,"url":"https://api.github.com/repos/atom/settings-view","forks_url":"https://api.github.com/repos/atom/settings-view/forks","keys_url":"https://api.github.com/repos/atom/settings-view/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/settings-view/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/settings-view/teams","hooks_url":"https://api.github.com/repos/atom/settings-view/hooks","issue_events_url":"https://api.github.com/repos/atom/settings-view/issues/events{/number}","events_url":"https://api.github.com/repos/atom/settings-view/events","assignees_url":"https://api.github.com/repos/atom/settings-view/assignees{/user}","branches_url":"https://api.github.com/repos/atom/settings-view/branches{/branch}","tags_url":"https://api.github.com/repos/atom/settings-view/tags","blobs_url":"https://api.github.com/repos/atom/settings-view/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/settings-view/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/settings-view/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/settings-view/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/settings-view/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/settings-view/languages","stargazers_url":"https://api.github.com/repos/atom/settings-view/stargazers","contributors_url":"https://api.github.com/repos/atom/settings-view/contributors","subscribers_url":"https://api.github.com/repos/atom/settings-view/subscribers","subscription_url":"https://api.github.com/repos/atom/settings-view/subscription","commits_url":"https://api.github.com/repos/atom/settings-view/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/settings-view/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/settings-view/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/settings-view/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/settings-view/contents/{+path}","compare_url":"https://api.github.com/repos/atom/settings-view/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/settings-view/merges","archive_url":"https://api.github.com/repos/atom/settings-view/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/settings-view/downloads","issues_url":"https://api.github.com/repos/atom/settings-view/issues{/number}","pulls_url":"https://api.github.com/repos/atom/settings-view/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/settings-view/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/settings-view/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/settings-view/labels{/name}","releases_url":"https://api.github.com/repos/atom/settings-view/releases{/id}","created_at":"2013-08-13T19:16:23Z","updated_at":"2015-09-28T20:33:52Z","pushed_at":"2015-10-09T10:20:18Z","git_url":"git://github.com/atom/settings-view.git","ssh_url":"git@github.com:atom/settings-view.git","clone_url":"https://github.com/atom/settings-view.git","svn_url":"https://github.com/atom/settings-view","homepage":null,"size":4597,"stargazers_count":69,"watchers_count":69,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":120,"forks":70,"open_issues":120,"watchers":69,"default_branch":"master"}},"base":{"label":"atom:master","ref":"master","sha":"cb09a2d80fcab4c91b3cf47e7d6fe02174a4b1c0","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":12090329,"name":"settings-view","full_name":"atom/settings-view","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/settings-view","description":"Edit Atom settings","fork":false,"url":"https://api.github.com/repos/atom/settings-view","forks_url":"https://api.github.com/repos/atom/settings-view/forks","keys_url":"https://api.github.com/repos/atom/settings-view/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/settings-view/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/settings-view/teams","hooks_url":"https://api.github.com/repos/atom/settings-view/hooks","issue_events_url":"https://api.github.com/repos/atom/settings-view/issues/events{/number}","events_url":"https://api.github.com/repos/atom/settings-view/events","assignees_url":"https://api.github.com/repos/atom/settings-view/assignees{/user}","branches_url":"https://api.github.com/repos/atom/settings-view/branches{/branch}","tags_url":"https://api.github.com/repos/atom/settings-view/tags","blobs_url":"https://api.github.com/repos/atom/settings-view/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/settings-view/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/settings-view/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/settings-view/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/settings-view/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/settings-view/languages","stargazers_url":"https://api.github.com/repos/atom/settings-view/stargazers","contributors_url":"https://api.github.com/repos/atom/settings-view/contributors","subscribers_url":"https://api.github.com/repos/atom/settings-view/subscribers","subscription_url":"https://api.github.com/repos/atom/settings-view/subscription","commits_url":"https://api.github.com/repos/atom/settings-view/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/settings-view/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/settings-view/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/settings-view/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/settings-view/contents/{+path}","compare_url":"https://api.github.com/repos/atom/settings-view/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/settings-view/merges","archive_url":"https://api.github.com/repos/atom/settings-view/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/settings-view/downloads","issues_url":"https://api.github.com/repos/atom/settings-view/issues{/number}","pulls_url":"https://api.github.com/repos/atom/settings-view/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/settings-view/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/settings-view/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/settings-view/labels{/name}","releases_url":"https://api.github.com/repos/atom/settings-view/releases{/id}","created_at":"2013-08-13T19:16:23Z","updated_at":"2015-09-28T20:33:52Z","pushed_at":"2015-10-09T10:20:18Z","git_url":"git://github.com/atom/settings-view.git","ssh_url":"git@github.com:atom/settings-view.git","clone_url":"https://github.com/atom/settings-view.git","svn_url":"https://github.com/atom/settings-view","homepage":null,"size":4597,"stargazers_count":69,"watchers_count":69,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":120,"forks":70,"open_issues":120,"watchers":69,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/settings-view/pulls/676"},"html":{"href":"https://github.com/atom/settings-view/pull/676"},"issue":{"href":"https://api.github.com/repos/atom/settings-view/issues/676"},"comments":{"href":"https://api.github.com/repos/atom/settings-view/issues/676/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/settings-view/pulls/676/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/settings-view/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/settings-view/pulls/676/commits"},"statuses":{"href":"https://api.github.com/repos/atom/settings-view/statuses/1a29c2d38559d236e5f3aab7597b252037972766"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"izuzak","id":38924,"avatar_url":"https://avatars.githubusercontent.com/u/38924?v=3","gravatar_id":"","url":"https://api.github.com/users/izuzak","html_url":"https://github.com/izuzak","followers_url":"https://api.github.com/users/izuzak/followers","following_url":"https://api.github.com/users/izuzak/following{/other_user}","gists_url":"https://api.github.com/users/izuzak/gists{/gist_id}","starred_url":"https://api.github.com/users/izuzak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izuzak/subscriptions","organizations_url":"https://api.github.com/users/izuzak/orgs","repos_url":"https://api.github.com/users/izuzak/repos","events_url":"https://api.github.com/users/izuzak/events{/privacy}","received_events_url":"https://api.github.com/users/izuzak/received_events","type":"User","site_admin":true},"comments":2,"review_comments":0,"commits":3,"additions":15,"deletions":4,"changed_files":2}}