Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update remote_repo refs to fix autobump flows #18412

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/bump-cask-pr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def replace_version_and_checksum(cask, new_hash, new_version, replacement_pairs)

sig { params(cask: Cask::Cask, new_version: BumpVersionParser).void }
def check_pull_requests(cask, new_version:)
tap_remote_repo = cask.tap.full_name || cask.tap.remote_repo
tap_remote_repo = cask.tap.full_name || cask.tap.remote_repository

file = cask.sourcefile_path.relative_path_from(cask.tap.path).to_s
quiet = args.quiet?
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/bump-formula-pr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def run
# spamming during normal output.
Homebrew.install_bundler_gems!(groups: ["audit", "style"]) unless args.no_audit?

tap_remote_repo = formula.tap.full_name || formula.tap.remote_repo
tap_remote_repo = formula.tap.full_name || formula.tap.remote_repository
remote = "origin"
remote_branch = formula.tap.git_repository.origin_branch_name
previous_branch = "-"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/bump.rb
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def livecheck_result(formula_or_cask)
).returns T.nilable(T.any(T::Array[String], String))
}
def retrieve_pull_requests(formula_or_cask, name, version: nil)
tap_remote_repo = formula_or_cask.tap&.remote_repo || formula_or_cask.tap&.full_name
tap_remote_repository = formula_or_cask.tap&.remote_repository || formula_or_cask.tap&.full_name
pull_requests = begin
GitHub.fetch_pull_requests(name, tap_remote_repo, version:)
chenrui333 marked this conversation as resolved.
Show resolved Hide resolved
rescue GitHub::API::ValidationFailedError => e
Expand Down
10 changes: 5 additions & 5 deletions Library/Homebrew/test/download_strategies/git_spec.rb
chenrui333 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ def setup_git_repo
end

describe "#fetch_last_commit" do
let(:url) { "file://#{remote_repo}" }
let(:url) { "file://#{remote_repository}" }
let(:version) { Version.new("HEAD") }
let(:remote_repo) { HOMEBREW_PREFIX/"remote_repo" }
let(:remote_repository) { HOMEBREW_PREFIX/"remote_repository" }

before { remote_repo.mkpath }
before { remote_repository.mkpath }

after { FileUtils.rm_rf remote_repo }
after { FileUtils.rm_rf remote_repository }

it "fetches the hash of the last commit" do
remote_repo.cd do
remote_repository.cd do
setup_git_repo
FileUtils.touch "LICENSE"
git_commit_all
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/test/tap_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def setup_completion(link:)
end
end

describe "#remote_repo" do
describe "#remote_repository" do
it "returns the remote https repository" do
setup_git_repo

Expand Down
Loading