{"action":"closed","number":679,"pull_request":{"url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/pulls/679","id":238904727,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4OTA0NzI3","html_url":"https://github.com/Microsoft/tslint-microsoft-contrib/pull/679","diff_url":"https://github.com/Microsoft/tslint-microsoft-contrib/pull/679.diff","patch_url":"https://github.com/Microsoft/tslint-microsoft-contrib/pull/679.patch","issue_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/issues/679","number":679,"state":"closed","locked":false,"title":"Used inquirer to prompt for properties when creating a new rule.","user":{"login":"reduckted","id":10321525,"node_id":"MDQ6VXNlcjEwMzIxNTI1","avatar_url":"https://avatars0.githubusercontent.com/u/10321525?v=4","gravatar_id":"","url":"https://api.github.com/users/reduckted","html_url":"https://github.com/reduckted","followers_url":"https://api.github.com/users/reduckted/followers","following_url":"https://api.github.com/users/reduckted/following{/other_user}","gists_url":"https://api.github.com/users/reduckted/gists{/gist_id}","starred_url":"https://api.github.com/users/reduckted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reduckted/subscriptions","organizations_url":"https://api.github.com/users/reduckted/orgs","repos_url":"https://api.github.com/users/reduckted/repos","events_url":"https://api.github.com/users/reduckted/events{/privacy}","received_events_url":"https://api.github.com/users/reduckted/received_events","type":"User","site_admin":false},"body":"#### PR checklist\r\n\r\n-   [x] Addresses an existing issue: fixes #258 \r\n-   [x] New feature, bugfix, or enhancement\r\n    -   ~Includes tests~\r\n-   [x] Documentation update\r\n\r\n#### Overview of change:\r\n\r\nAs per #258, I've used [Inquirer.js](https://github.com/SBoudrias/Inquirer.js) to prompt for the rule's metadata. \r\n\r\nAll metadata except for the `options` (and related properties) and `commonWeaknessEnumeration` can be specified. I figured it wasn't worth doing anything with CWE because of #611.\r\n\r\n#### Is there anything you'd like reviewers to focus on?\r\n\r\nThe existing generator didn't actually work, because it tried to add the new rule to the root `tslint.json` file, but that file contains comments and cannot be parsed as JSON. For now, I've removed that step, but I kinda think it's something that should still be done. I'm just not sure how to go about doing it. 😕 Any suggestions are welcome.\r\n\r\nI've also tried to be nice and open the new rule's files after they've been created. I can detect that the generator is running in the VS Code terminal by looking at the environment variables and just launch `code new_file_name.ts` to open the file in the current VS Code instance. It works for me on Windows. In theory it should work on other operating systems, but I haven't confirmed that. I'm happy to remove this feature if you don't think it's worth the trouble.","created_at":"2018-12-15T10:52:36Z","updated_at":"2018-12-18T14:36:19Z","closed_at":"2018-12-18T14:36:19Z","merged_at":"2018-12-18T14:36:18Z","merge_commit_sha":"59b413bf73a3bc61f28705ca389b4bd0ead28f70","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/pulls/679/commits","review_comments_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/pulls/679/comments","review_comment_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/issues/679/comments","statuses_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/statuses/953d27ca0efdfb01a69fd1c3becbeab6f2bb7d32","head":{"label":"reduckted:258-new-rule-generator","ref":"258-new-rule-generator","sha":"953d27ca0efdfb01a69fd1c3becbeab6f2bb7d32","user":{"login":"reduckted","id":10321525,"node_id":"MDQ6VXNlcjEwMzIxNTI1","avatar_url":"https://avatars0.githubusercontent.com/u/10321525?v=4","gravatar_id":"","url":"https://api.github.com/users/reduckted","html_url":"https://github.com/reduckted","followers_url":"https://api.github.com/users/reduckted/followers","following_url":"https://api.github.com/users/reduckted/following{/other_user}","gists_url":"https://api.github.com/users/reduckted/gists{/gist_id}","starred_url":"https://api.github.com/users/reduckted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reduckted/subscriptions","organizations_url":"https://api.github.com/users/reduckted/orgs","repos_url":"https://api.github.com/users/reduckted/repos","events_url":"https://api.github.com/users/reduckted/events{/privacy}","received_events_url":"https://api.github.com/users/reduckted/received_events","type":"User","site_admin":false},"repo":{"id":152831138,"node_id":"MDEwOlJlcG9zaXRvcnkxNTI4MzExMzg=","name":"tslint-microsoft-contrib","full_name":"reduckted/tslint-microsoft-contrib","private":false,"owner":{"login":"reduckted","id":10321525,"node_id":"MDQ6VXNlcjEwMzIxNTI1","avatar_url":"https://avatars0.githubusercontent.com/u/10321525?v=4","gravatar_id":"","url":"https://api.github.com/users/reduckted","html_url":"https://github.com/reduckted","followers_url":"https://api.github.com/users/reduckted/followers","following_url":"https://api.github.com/users/reduckted/following{/other_user}","gists_url":"https://api.github.com/users/reduckted/gists{/gist_id}","starred_url":"https://api.github.com/users/reduckted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reduckted/subscriptions","organizations_url":"https://api.github.com/users/reduckted/orgs","repos_url":"https://api.github.com/users/reduckted/repos","events_url":"https://api.github.com/users/reduckted/events{/privacy}","received_events_url":"https://api.github.com/users/reduckted/received_events","type":"User","site_admin":false},"html_url":"https://github.com/reduckted/tslint-microsoft-contrib","description":"A set of TSLint rules used on some Microsoft projects.","fork":true,"url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib","forks_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/forks","keys_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/teams","hooks_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/hooks","issue_events_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/issues/events{/number}","events_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/events","assignees_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/assignees{/user}","branches_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/branches{/branch}","tags_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/tags","blobs_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/languages","stargazers_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/stargazers","contributors_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/contributors","subscribers_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/subscribers","subscription_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/subscription","commits_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/contents/{+path}","compare_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/merges","archive_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/downloads","issues_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/issues{/number}","pulls_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/labels{/name}","releases_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/releases{/id}","deployments_url":"https://api.github.com/repos/reduckted/tslint-microsoft-contrib/deployments","created_at":"2018-10-13T03:26:09Z","updated_at":"2018-12-15T01:38:28Z","pushed_at":"2018-12-18T09:56:44Z","git_url":"git://github.com/reduckted/tslint-microsoft-contrib.git","ssh_url":"git@github.com:reduckted/tslint-microsoft-contrib.git","clone_url":"https://github.com/reduckted/tslint-microsoft-contrib.git","svn_url":"https://github.com/reduckted/tslint-microsoft-contrib","homepage":null,"size":2911,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"112ca00cecb237fd6c5a00c66c57a50c10f4e580","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":41095157,"node_id":"MDEwOlJlcG9zaXRvcnk0MTA5NTE1Nw==","name":"tslint-microsoft-contrib","full_name":"Microsoft/tslint-microsoft-contrib","private":false,"owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Microsoft/tslint-microsoft-contrib","description":"A set of TSLint rules used on some Microsoft projects.","fork":false,"url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib","forks_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/forks","keys_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/teams","hooks_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/events","assignees_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/tags","blobs_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/languages","stargazers_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/subscription","commits_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/merges","archive_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/downloads","issues_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/deployments","created_at":"2015-08-20T12:44:29Z","updated_at":"2018-12-18T08:48:02Z","pushed_at":"2018-12-18T14:36:18Z","git_url":"git://github.com/Microsoft/tslint-microsoft-contrib.git","ssh_url":"git@github.com:Microsoft/tslint-microsoft-contrib.git","clone_url":"https://github.com/Microsoft/tslint-microsoft-contrib.git","svn_url":"https://github.com/Microsoft/tslint-microsoft-contrib","homepage":null,"size":2942,"stargazers_count":493,"watchers_count":493,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":172,"mirror_url":null,"archived":false,"open_issues_count":109,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":172,"open_issues":109,"watchers":493,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/pulls/679"},"html":{"href":"https://github.com/Microsoft/tslint-microsoft-contrib/pull/679"},"issue":{"href":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/issues/679"},"comments":{"href":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/issues/679/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/pulls/679/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/pulls/679/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/tslint-microsoft-contrib/statuses/953d27ca0efdfb01a69fd1c3becbeab6f2bb7d32"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"JoshuaKGoldberg","id":3335181,"node_id":"MDQ6VXNlcjMzMzUxODE=","avatar_url":"https://avatars1.githubusercontent.com/u/3335181?v=4","gravatar_id":"","url":"https://api.github.com/users/JoshuaKGoldberg","html_url":"https://github.com/JoshuaKGoldberg","followers_url":"https://api.github.com/users/JoshuaKGoldberg/followers","following_url":"https://api.github.com/users/JoshuaKGoldberg/following{/other_user}","gists_url":"https://api.github.com/users/JoshuaKGoldberg/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshuaKGoldberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshuaKGoldberg/subscriptions","organizations_url":"https://api.github.com/users/JoshuaKGoldberg/orgs","repos_url":"https://api.github.com/users/JoshuaKGoldberg/repos","events_url":"https://api.github.com/users/JoshuaKGoldberg/events{/privacy}","received_events_url":"https://api.github.com/users/JoshuaKGoldberg/received_events","type":"User","site_admin":false},"comments":1,"review_comments":5,"maintainer_can_modify":false,"commits":4,"additions":332,"deletions":80,"changed_files":5}}
{"actor":{"display_login":"JoshuaKGoldberg"}}