{"action":"created","comment":{"url":"https://api.github.com/repos/atom/apm/pulls/comments/36146397","id":36146397,"diff_hunk":"@@ -29,6 +29,8 @@ class Link extends Command\n     {callback} = options\n     options = @parseOptions(options.commandArgs)\n \n+    options.argv._[0] = if options.argv._[0] then String(options.argv._[0])","path":"src/link.coffee","position":4,"original_position":4,"commit_id":"c2d393d2b89043bcb51b4782960b305e693ebb82","original_commit_id":"c2d393d2b89043bcb51b4782960b305e693ebb82","user":{"login":"kevinsawicki","id":671378,"avatar_url":"https://avatars.githubusercontent.com/u/671378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsawicki","html_url":"https://github.com/kevinsawicki","followers_url":"https://api.github.com/users/kevinsawicki/followers","following_url":"https://api.github.com/users/kevinsawicki/following{/other_user}","gists_url":"https://api.github.com/users/kevinsawicki/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsawicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsawicki/subscriptions","organizations_url":"https://api.github.com/users/kevinsawicki/orgs","repos_url":"https://api.github.com/users/kevinsawicki/repos","events_url":"https://api.github.com/users/kevinsawicki/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsawicki/received_events","type":"User","site_admin":true},"body":"Instead of assigning back to this array, what do you think about pulling out a variable that incorporates defaulting and stringifying into its own line.\r\n\r\nSomething like:\r\n\r\n```coffee\r\npackagePath = options.argv._[0]?.toString() ? '.'\r\nlinkPath = path.resolve(process.cwd(), packagePath)\r\n```","created_at":"2015-08-04T00:19:29Z","updated_at":"2015-08-04T00:19:29Z","html_url":"https://github.com/atom/apm/pull/392#discussion_r36146397","pull_request_url":"https://api.github.com/repos/atom/apm/pulls/392","_links":{"self":{"href":"https://api.github.com/repos/atom/apm/pulls/comments/36146397"},"html":{"href":"https://github.com/atom/apm/pull/392#discussion_r36146397"},"pull_request":{"href":"https://api.github.com/repos/atom/apm/pulls/392"}}},"pull_request":{"url":"https://api.github.com/repos/atom/apm/pulls/392","id":39188385,"html_url":"https://github.com/atom/apm/pull/392","diff_url":"https://github.com/atom/apm/pull/392.diff","patch_url":"https://github.com/atom/apm/pull/392.patch","issue_url":"https://api.github.com/repos/atom/apm/issues/392","number":392,"state":"open","locked":false,"title":"Stringify argument to apm link / unlink","user":{"login":"mnquintana","id":823545,"avatar_url":"https://avatars.githubusercontent.com/u/823545?v=3","gravatar_id":"","url":"https://api.github.com/users/mnquintana","html_url":"https://github.com/mnquintana","followers_url":"https://api.github.com/users/mnquintana/followers","following_url":"https://api.github.com/users/mnquintana/following{/other_user}","gists_url":"https://api.github.com/users/mnquintana/gists{/gist_id}","starred_url":"https://api.github.com/users/mnquintana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnquintana/subscriptions","organizations_url":"https://api.github.com/users/mnquintana/orgs","repos_url":"https://api.github.com/users/mnquintana/repos","events_url":"https://api.github.com/users/mnquintana/events{/privacy}","received_events_url":"https://api.github.com/users/mnquintana/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/atom/apm/issues/391\r\n\r\n/cc @atom/feedback ","created_at":"2015-07-03T16:57:53Z","updated_at":"2015-08-04T00:19:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2d7a0859a5d8fe3b35bcacd26725c3d30939731","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atom/apm/pulls/392/commits","review_comments_url":"https://api.github.com/repos/atom/apm/pulls/392/comments","review_comment_url":"https://api.github.com/repos/atom/apm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/apm/issues/392/comments","statuses_url":"https://api.github.com/repos/atom/apm/statuses/c2d393d2b89043bcb51b4782960b305e693ebb82","head":{"label":"atom:mq-fix-link-unlink","ref":"mq-fix-link-unlink","sha":"c2d393d2b89043bcb51b4782960b305e693ebb82","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":9916379,"name":"apm","full_name":"atom/apm","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/apm","description":"Atom Package Manager","fork":false,"url":"https://api.github.com/repos/atom/apm","forks_url":"https://api.github.com/repos/atom/apm/forks","keys_url":"https://api.github.com/repos/atom/apm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/apm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/apm/teams","hooks_url":"https://api.github.com/repos/atom/apm/hooks","issue_events_url":"https://api.github.com/repos/atom/apm/issues/events{/number}","events_url":"https://api.github.com/repos/atom/apm/events","assignees_url":"https://api.github.com/repos/atom/apm/assignees{/user}","branches_url":"https://api.github.com/repos/atom/apm/branches{/branch}","tags_url":"https://api.github.com/repos/atom/apm/tags","blobs_url":"https://api.github.com/repos/atom/apm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/apm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/apm/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/apm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/apm/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/apm/languages","stargazers_url":"https://api.github.com/repos/atom/apm/stargazers","contributors_url":"https://api.github.com/repos/atom/apm/contributors","subscribers_url":"https://api.github.com/repos/atom/apm/subscribers","subscription_url":"https://api.github.com/repos/atom/apm/subscription","commits_url":"https://api.github.com/repos/atom/apm/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/apm/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/apm/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/apm/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/apm/contents/{+path}","compare_url":"https://api.github.com/repos/atom/apm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/apm/merges","archive_url":"https://api.github.com/repos/atom/apm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/apm/downloads","issues_url":"https://api.github.com/repos/atom/apm/issues{/number}","pulls_url":"https://api.github.com/repos/atom/apm/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/apm/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/apm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/apm/labels{/name}","releases_url":"https://api.github.com/repos/atom/apm/releases{/id}","created_at":"2013-05-07T16:27:05Z","updated_at":"2015-08-03T07:17:49Z","pushed_at":"2015-08-03T18:00:20Z","git_url":"git://github.com/atom/apm.git","ssh_url":"git@github.com:atom/apm.git","clone_url":"https://github.com/atom/apm.git","svn_url":"https://github.com/atom/apm","homepage":"https://atom.io/packages","size":10295,"stargazers_count":418,"watchers_count":418,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":103,"mirror_url":null,"open_issues_count":96,"forks":103,"open_issues":96,"watchers":418,"default_branch":"master"}},"base":{"label":"atom:master","ref":"master","sha":"42333e33c8f16291e4a38e5b8df884e7bf516e8a","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":9916379,"name":"apm","full_name":"atom/apm","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/apm","description":"Atom Package Manager","fork":false,"url":"https://api.github.com/repos/atom/apm","forks_url":"https://api.github.com/repos/atom/apm/forks","keys_url":"https://api.github.com/repos/atom/apm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/apm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/apm/teams","hooks_url":"https://api.github.com/repos/atom/apm/hooks","issue_events_url":"https://api.github.com/repos/atom/apm/issues/events{/number}","events_url":"https://api.github.com/repos/atom/apm/events","assignees_url":"https://api.github.com/repos/atom/apm/assignees{/user}","branches_url":"https://api.github.com/repos/atom/apm/branches{/branch}","tags_url":"https://api.github.com/repos/atom/apm/tags","blobs_url":"https://api.github.com/repos/atom/apm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/apm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/apm/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/apm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/apm/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/apm/languages","stargazers_url":"https://api.github.com/repos/atom/apm/stargazers","contributors_url":"https://api.github.com/repos/atom/apm/contributors","subscribers_url":"https://api.github.com/repos/atom/apm/subscribers","subscription_url":"https://api.github.com/repos/atom/apm/subscription","commits_url":"https://api.github.com/repos/atom/apm/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/apm/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/apm/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/apm/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/apm/contents/{+path}","compare_url":"https://api.github.com/repos/atom/apm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/apm/merges","archive_url":"https://api.github.com/repos/atom/apm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/apm/downloads","issues_url":"https://api.github.com/repos/atom/apm/issues{/number}","pulls_url":"https://api.github.com/repos/atom/apm/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/apm/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/apm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/apm/labels{/name}","releases_url":"https://api.github.com/repos/atom/apm/releases{/id}","created_at":"2013-05-07T16:27:05Z","updated_at":"2015-08-03T07:17:49Z","pushed_at":"2015-08-03T18:00:20Z","git_url":"git://github.com/atom/apm.git","ssh_url":"git@github.com:atom/apm.git","clone_url":"https://github.com/atom/apm.git","svn_url":"https://github.com/atom/apm","homepage":"https://atom.io/packages","size":10295,"stargazers_count":418,"watchers_count":418,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":103,"mirror_url":null,"open_issues_count":96,"forks":103,"open_issues":96,"watchers":418,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/apm/pulls/392"},"html":{"href":"https://github.com/atom/apm/pull/392"},"issue":{"href":"https://api.github.com/repos/atom/apm/issues/392"},"comments":{"href":"https://api.github.com/repos/atom/apm/issues/392/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/apm/pulls/392/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/apm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/apm/pulls/392/commits"},"statuses":{"href":"https://api.github.com/repos/atom/apm/statuses/c2d393d2b89043bcb51b4782960b305e693ebb82"}}}}