From 841725fcd97c8c656ec3df81c558a62ccbc16240 Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Thu, 20 Apr 2023 18:44:09 -0700 Subject: [PATCH] Remove more hardcoded `master` references Removing two more hardcoded references to `master` that I discovered. Originally I assumed we'd need to flip these to `HEAD`, but in `https://github.com/dependabot/dependabot-core/pull/6149` we were able to get away with simply removing the hardcoded reference altogether in the `bundler` ecosystem and we haven't seen any ill effects the past 6 months... So let's try removing this and see if it works as smoothly in these ecosystems as it did in the `bundler` ecosystem. --- hex/helpers/lib/parse_deps.exs | 2 +- npm_and_yarn/lib/dependabot/npm_and_yarn/file_parser.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hex/helpers/lib/parse_deps.exs b/hex/helpers/lib/parse_deps.exs index f4b2240dd53..89d8f8c4d62 100644 --- a/hex/helpers/lib/parse_deps.exs +++ b/hex/helpers/lib/parse_deps.exs @@ -109,7 +109,7 @@ defmodule Parser do %{ type: "git", url: repo_url, - branch: opts[:branch] || "master", + branch: opts[:branch], ref: ref } end diff --git a/npm_and_yarn/lib/dependabot/npm_and_yarn/file_parser.rb b/npm_and_yarn/lib/dependabot/npm_and_yarn/file_parser.rb index b4c251047b8..62a4afed944 100644 --- a/npm_and_yarn/lib/dependabot/npm_and_yarn/file_parser.rb +++ b/npm_and_yarn/lib/dependabot/npm_and_yarn/file_parser.rb @@ -508,7 +508,7 @@ def git_source_for(requirement) type: "git", url: "https://#{host}/#{details['username']}/#{details['repo']}", branch: nil, - ref: details["ref"] || "master" + ref: details["ref"] } end