{"action":"created","comment":{"url":"https://api.github.com/repos/dependabot/dependabot-core/pulls/comments/228267016","pull_request_review_id":168501260,"id":228267016,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODI2NzAxNg==","diff_hunk":"@@ -68,20 +68,17 @@ async function updateDependencyFiles(\n }\n \n function install_args(depName, desiredVersion, requirements, oldLockfile) {\n-  const source = (\n-    requirements.find(req => {\n-      return req.source;\n-    }) || {}\n-  ).source;\n+  const source = (requirements.find(req => req.source) || {}).source;\n \n   if (source && source.type === \"git\") {\n-    var originalVersion = ((oldLockfile[\"dependencies\"] || {})[depName] || {})[\n+    let originalVersion = ((oldLockfile[\"dependencies\"] || {})[depName] || {})[\n       \"version\"\n     ];\n-    originalVersion = originalVersion || `${source.url}#ref`;\n+\n     if (!originalVersion.includes(\"#\")) {","path":"helpers/npm/lib/updater.js","position":18,"original_position":18,"commit_id":"aa0d6b4b1467a80a13a2ea645de80e4cfb652423","original_commit_id":"aa0d6b4b1467a80a13a2ea645de80e4cfb652423","user":{"login":"feelepxyz","id":20165,"node_id":"MDQ6VXNlcjIwMTY1","avatar_url":"https://avatars1.githubusercontent.com/u/20165?v=4","gravatar_id":"","url":"https://api.github.com/users/feelepxyz","html_url":"https://github.com/feelepxyz","followers_url":"https://api.github.com/users/feelepxyz/followers","following_url":"https://api.github.com/users/feelepxyz/following{/other_user}","gists_url":"https://api.github.com/users/feelepxyz/gists{/gist_id}","starred_url":"https://api.github.com/users/feelepxyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feelepxyz/subscriptions","organizations_url":"https://api.github.com/users/feelepxyz/orgs","repos_url":"https://api.github.com/users/feelepxyz/repos","events_url":"https://api.github.com/users/feelepxyz/events{/privacy}","received_events_url":"https://api.github.com/users/feelepxyz/received_events","type":"User","site_admin":false},"body":"@ygnoh looks like `originalVersion` could be undefined here so `.includes()` will throw, could you guard against this here? `if (!originalVersion || !originalVersion.includes(\"#\")) {...`","created_at":"2018-10-25T17:34:07Z","updated_at":"2018-10-25T17:39:19Z","html_url":"https://github.com/dependabot/dependabot-core/pull/723#discussion_r228267016","pull_request_url":"https://api.github.com/repos/dependabot/dependabot-core/pulls/723","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dependabot/dependabot-core/pulls/comments/228267016"},"html":{"href":"https://github.com/dependabot/dependabot-core/pull/723#discussion_r228267016"},"pull_request":{"href":"https://api.github.com/repos/dependabot/dependabot-core/pulls/723"}}},"pull_request":{"url":"https://api.github.com/repos/dependabot/dependabot-core/pulls/723","id":225826844,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1ODI2ODQ0","html_url":"https://github.com/dependabot/dependabot-core/pull/723","diff_url":"https://github.com/dependabot/dependabot-core/pull/723.diff","patch_url":"https://github.com/dependabot/dependabot-core/pull/723.patch","issue_url":"https://api.github.com/repos/dependabot/dependabot-core/issues/723","number":723,"state":"open","locked":false,"title":"Remove 'var' declarations and reduce 'if' statements in updater.js","user":{"login":"ygnoh","id":13075245,"node_id":"MDQ6VXNlcjEzMDc1MjQ1","avatar_url":"https://avatars0.githubusercontent.com/u/13075245?v=4","gravatar_id":"","url":"https://api.github.com/users/ygnoh","html_url":"https://github.com/ygnoh","followers_url":"https://api.github.com/users/ygnoh/followers","following_url":"https://api.github.com/users/ygnoh/following{/other_user}","gists_url":"https://api.github.com/users/ygnoh/gists{/gist_id}","starred_url":"https://api.github.com/users/ygnoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ygnoh/subscriptions","organizations_url":"https://api.github.com/users/ygnoh/orgs","repos_url":"https://api.github.com/users/ygnoh/repos","events_url":"https://api.github.com/users/ygnoh/events{/privacy}","received_events_url":"https://api.github.com/users/ygnoh/received_events","type":"User","site_admin":false},"body":"- Remove `var` declarations. `var` is obsolete and `let` and `const` are more intuitive and safe.\r\n- Reduce unnecessary `if` statements.","created_at":"2018-10-25T16:33:08Z","updated_at":"2018-10-25T17:39:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"752f57f313f37f1a79dbf1250056a1c2b1c3e2dc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dependabot/dependabot-core/pulls/723/commits","review_comments_url":"https://api.github.com/repos/dependabot/dependabot-core/pulls/723/comments","review_comment_url":"https://api.github.com/repos/dependabot/dependabot-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dependabot/dependabot-core/issues/723/comments","statuses_url":"https://api.github.com/repos/dependabot/dependabot-core/statuses/aa0d6b4b1467a80a13a2ea645de80e4cfb652423","head":{"label":"ygnoh:improve-js-logic","ref":"improve-js-logic","sha":"aa0d6b4b1467a80a13a2ea645de80e4cfb652423","user":{"login":"ygnoh","id":13075245,"node_id":"MDQ6VXNlcjEzMDc1MjQ1","avatar_url":"https://avatars0.githubusercontent.com/u/13075245?v=4","gravatar_id":"","url":"https://api.github.com/users/ygnoh","html_url":"https://github.com/ygnoh","followers_url":"https://api.github.com/users/ygnoh/followers","following_url":"https://api.github.com/users/ygnoh/following{/other_user}","gists_url":"https://api.github.com/users/ygnoh/gists{/gist_id}","starred_url":"https://api.github.com/users/ygnoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ygnoh/subscriptions","organizations_url":"https://api.github.com/users/ygnoh/orgs","repos_url":"https://api.github.com/users/ygnoh/repos","events_url":"https://api.github.com/users/ygnoh/events{/privacy}","received_events_url":"https://api.github.com/users/ygnoh/received_events","type":"User","site_admin":false},"repo":{"id":154697143,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ2OTcxNDM=","name":"dependabot-core","full_name":"ygnoh/dependabot-core","private":false,"owner":{"login":"ygnoh","id":13075245,"node_id":"MDQ6VXNlcjEzMDc1MjQ1","avatar_url":"https://avatars0.githubusercontent.com/u/13075245?v=4","gravatar_id":"","url":"https://api.github.com/users/ygnoh","html_url":"https://github.com/ygnoh","followers_url":"https://api.github.com/users/ygnoh/followers","following_url":"https://api.github.com/users/ygnoh/following{/other_user}","gists_url":"https://api.github.com/users/ygnoh/gists{/gist_id}","starred_url":"https://api.github.com/users/ygnoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ygnoh/subscriptions","organizations_url":"https://api.github.com/users/ygnoh/orgs","repos_url":"https://api.github.com/users/ygnoh/repos","events_url":"https://api.github.com/users/ygnoh/events{/privacy}","received_events_url":"https://api.github.com/users/ygnoh/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ygnoh/dependabot-core","description":"🤖 The core logic behind Dependabot's update PR creation","fork":true,"url":"https://api.github.com/repos/ygnoh/dependabot-core","forks_url":"https://api.github.com/repos/ygnoh/dependabot-core/forks","keys_url":"https://api.github.com/repos/ygnoh/dependabot-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ygnoh/dependabot-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ygnoh/dependabot-core/teams","hooks_url":"https://api.github.com/repos/ygnoh/dependabot-core/hooks","issue_events_url":"https://api.github.com/repos/ygnoh/dependabot-core/issues/events{/number}","events_url":"https://api.github.com/repos/ygnoh/dependabot-core/events","assignees_url":"https://api.github.com/repos/ygnoh/dependabot-core/assignees{/user}","branches_url":"https://api.github.com/repos/ygnoh/dependabot-core/branches{/branch}","tags_url":"https://api.github.com/repos/ygnoh/dependabot-core/tags","blobs_url":"https://api.github.com/repos/ygnoh/dependabot-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ygnoh/dependabot-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ygnoh/dependabot-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ygnoh/dependabot-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ygnoh/dependabot-core/statuses/{sha}","languages_url":"https://api.github.com/repos/ygnoh/dependabot-core/languages","stargazers_url":"https://api.github.com/repos/ygnoh/dependabot-core/stargazers","contributors_url":"https://api.github.com/repos/ygnoh/dependabot-core/contributors","subscribers_url":"https://api.github.com/repos/ygnoh/dependabot-core/subscribers","subscription_url":"https://api.github.com/repos/ygnoh/dependabot-core/subscription","commits_url":"https://api.github.com/repos/ygnoh/dependabot-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ygnoh/dependabot-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ygnoh/dependabot-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ygnoh/dependabot-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/ygnoh/dependabot-core/contents/{+path}","compare_url":"https://api.github.com/repos/ygnoh/dependabot-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ygnoh/dependabot-core/merges","archive_url":"https://api.github.com/repos/ygnoh/dependabot-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ygnoh/dependabot-core/downloads","issues_url":"https://api.github.com/repos/ygnoh/dependabot-core/issues{/number}","pulls_url":"https://api.github.com/repos/ygnoh/dependabot-core/pulls{/number}","milestones_url":"https://api.github.com/repos/ygnoh/dependabot-core/milestones{/number}","notifications_url":"https://api.github.com/repos/ygnoh/dependabot-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ygnoh/dependabot-core/labels{/name}","releases_url":"https://api.github.com/repos/ygnoh/dependabot-core/releases{/id}","deployments_url":"https://api.github.com/repos/ygnoh/dependabot-core/deployments","created_at":"2018-10-25T15:45:20Z","updated_at":"2018-10-25T15:45:24Z","pushed_at":"2018-10-25T17:03:52Z","git_url":"git://github.com/ygnoh/dependabot-core.git","ssh_url":"git@github.com:ygnoh/dependabot-core.git","clone_url":"https://github.com/ygnoh/dependabot-core.git","svn_url":"https://github.com/ygnoh/dependabot-core","homepage":"https://dependabot.com","size":17144,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dependabot:master","ref":"master","sha":"43be2e13cd4fbd1f8b1260b2dd20e1af2b333fc8","user":{"login":"dependabot","id":27347476,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3MzQ3NDc2","avatar_url":"https://avatars1.githubusercontent.com/u/27347476?v=4","gravatar_id":"","url":"https://api.github.com/users/dependabot","html_url":"https://github.com/dependabot","followers_url":"https://api.github.com/users/dependabot/followers","following_url":"https://api.github.com/users/dependabot/following{/other_user}","gists_url":"https://api.github.com/users/dependabot/gists{/gist_id}","starred_url":"https://api.github.com/users/dependabot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dependabot/subscriptions","organizations_url":"https://api.github.com/users/dependabot/orgs","repos_url":"https://api.github.com/users/dependabot/repos","events_url":"https://api.github.com/users/dependabot/events{/privacy}","received_events_url":"https://api.github.com/users/dependabot/received_events","type":"Organization","site_admin":false},"repo":{"id":93163073,"node_id":"MDEwOlJlcG9zaXRvcnk5MzE2MzA3Mw==","name":"dependabot-core","full_name":"dependabot/dependabot-core","private":false,"owner":{"login":"dependabot","id":27347476,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3MzQ3NDc2","avatar_url":"https://avatars1.githubusercontent.com/u/27347476?v=4","gravatar_id":"","url":"https://api.github.com/users/dependabot","html_url":"https://github.com/dependabot","followers_url":"https://api.github.com/users/dependabot/followers","following_url":"https://api.github.com/users/dependabot/following{/other_user}","gists_url":"https://api.github.com/users/dependabot/gists{/gist_id}","starred_url":"https://api.github.com/users/dependabot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dependabot/subscriptions","organizations_url":"https://api.github.com/users/dependabot/orgs","repos_url":"https://api.github.com/users/dependabot/repos","events_url":"https://api.github.com/users/dependabot/events{/privacy}","received_events_url":"https://api.github.com/users/dependabot/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dependabot/dependabot-core","description":"🤖 The core logic behind Dependabot's update PR creation","fork":false,"url":"https://api.github.com/repos/dependabot/dependabot-core","forks_url":"https://api.github.com/repos/dependabot/dependabot-core/forks","keys_url":"https://api.github.com/repos/dependabot/dependabot-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dependabot/dependabot-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dependabot/dependabot-core/teams","hooks_url":"https://api.github.com/repos/dependabot/dependabot-core/hooks","issue_events_url":"https://api.github.com/repos/dependabot/dependabot-core/issues/events{/number}","events_url":"https://api.github.com/repos/dependabot/dependabot-core/events","assignees_url":"https://api.github.com/repos/dependabot/dependabot-core/assignees{/user}","branches_url":"https://api.github.com/repos/dependabot/dependabot-core/branches{/branch}","tags_url":"https://api.github.com/repos/dependabot/dependabot-core/tags","blobs_url":"https://api.github.com/repos/dependabot/dependabot-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dependabot/dependabot-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dependabot/dependabot-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/dependabot/dependabot-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dependabot/dependabot-core/statuses/{sha}","languages_url":"https://api.github.com/repos/dependabot/dependabot-core/languages","stargazers_url":"https://api.github.com/repos/dependabot/dependabot-core/stargazers","contributors_url":"https://api.github.com/repos/dependabot/dependabot-core/contributors","subscribers_url":"https://api.github.com/repos/dependabot/dependabot-core/subscribers","subscription_url":"https://api.github.com/repos/dependabot/dependabot-core/subscription","commits_url":"https://api.github.com/repos/dependabot/dependabot-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/dependabot/dependabot-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/dependabot/dependabot-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/dependabot/dependabot-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/dependabot/dependabot-core/contents/{+path}","compare_url":"https://api.github.com/repos/dependabot/dependabot-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dependabot/dependabot-core/merges","archive_url":"https://api.github.com/repos/dependabot/dependabot-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dependabot/dependabot-core/downloads","issues_url":"https://api.github.com/repos/dependabot/dependabot-core/issues{/number}","pulls_url":"https://api.github.com/repos/dependabot/dependabot-core/pulls{/number}","milestones_url":"https://api.github.com/repos/dependabot/dependabot-core/milestones{/number}","notifications_url":"https://api.github.com/repos/dependabot/dependabot-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dependabot/dependabot-core/labels{/name}","releases_url":"https://api.github.com/repos/dependabot/dependabot-core/releases{/id}","deployments_url":"https://api.github.com/repos/dependabot/dependabot-core/deployments","created_at":"2017-06-02T12:23:31Z","updated_at":"2018-10-25T16:42:59Z","pushed_at":"2018-10-25T17:03:54Z","git_url":"git://github.com/dependabot/dependabot-core.git","ssh_url":"git@github.com:dependabot/dependabot-core.git","clone_url":"https://github.com/dependabot/dependabot-core.git","svn_url":"https://github.com/dependabot/dependabot-core","homepage":"https://dependabot.com","size":17148,"stargazers_count":236,"watchers_count":236,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"archived":false,"open_issues_count":31,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":32,"open_issues":31,"watchers":236,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dependabot/dependabot-core/pulls/723"},"html":{"href":"https://github.com/dependabot/dependabot-core/pull/723"},"issue":{"href":"https://api.github.com/repos/dependabot/dependabot-core/issues/723"},"comments":{"href":"https://api.github.com/repos/dependabot/dependabot-core/issues/723/comments"},"review_comments":{"href":"https://api.github.com/repos/dependabot/dependabot-core/pulls/723/comments"},"review_comment":{"href":"https://api.github.com/repos/dependabot/dependabot-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dependabot/dependabot-core/pulls/723/commits"},"statuses":{"href":"https://api.github.com/repos/dependabot/dependabot-core/statuses/aa0d6b4b1467a80a13a2ea645de80e4cfb652423"}},"author_association":"NONE"}}
{"actor":{"display_login":"feelepxyz"}}