diff --git a/Library/Homebrew/dev-cmd/pr-pull.rb b/Library/Homebrew/dev-cmd/pr-pull.rb index 7bed63570f603..5f1cafa3cadab 100644 --- a/Library/Homebrew/dev-cmd/pr-pull.rb +++ b/Library/Homebrew/dev-cmd/pr-pull.rb @@ -56,7 +56,7 @@ class PrPull < AbstractCommand depends_on: "--autosquash", description: "Message to include when autosquashing revision bumps, deletions and rebuilds." flag "--artifact-pattern=", "--artifact=", - description: "Download artifacts with the specified pattern (default: `bottles{,-*}`)." + description: "Download artifacts with the specified pattern (default: `bottles{,_*}`)." flag "--tap=", description: "Target tap repository (default: `homebrew/core`)." flag "--root-url=", @@ -81,7 +81,7 @@ def run ensure_executable!("unzip", reason: "extracting CI artifacts") workflows = args.workflows.presence || ["tests.yml"] - artifact_pattern = args.artifact_pattern || "bottles{,-*}" + artifact_pattern = args.artifact_pattern || "bottles{,_*}" tap = Tap.fetch(args.tap || CoreTap.instance.name) raise TapUnavailableError, tap.name unless tap.installed? @@ -155,6 +155,7 @@ def run end ohai "Downloading bottles for workflow: #{workflow}" + urls = GitHub.get_artifact_urls(workflow_run) urls.each do |url| GitHub.download_artifact(url, pr) diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index de01f007c6317..a090cf87b33a6 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -283,7 +283,7 @@ def self.upload_release_asset(user, repo, id, local_file: nil, remote_file: nil) API.open_rest(url, data_binary_path: local_file, request_method: :POST, scopes: CREATE_ISSUE_FORK_OR_PR_SCOPES) end - def self.get_workflow_run(user, repo, pull_request, workflow_id: "tests.yml", artifact_pattern: "bottles{,-*}") + def self.get_workflow_run(user, repo, pull_request, workflow_id: "tests.yml", artifact_pattern: "bottles{,_*}") scopes = CREATE_ISSUE_FORK_OR_PR_SCOPES # GraphQL unfortunately has no way to get the workflow yml name, so we need an extra REST call.