diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 33d60a8cb3..c017a63b37 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -441,7 +441,7 @@ module GitHub base_url = "#{API_URL}/repos/#{user}/#{repo}" pr_payload = open_api("#{base_url}/pulls/#{pr}", scopes: scopes) pr_sha = pr_payload["head"]["sha"] - pr_branch = pr_payload["head"]["ref"] + pr_branch = URI.encode_www_form_component(pr_payload["head"]["ref"]) workflow = open_api("#{base_url}/actions/workflows/#{workflow_id}/runs?branch=#{pr_branch}", scopes: scopes) workflow_run = workflow["workflow_runs"].select do |run|