From 7c752e487f81e138a63b2ebb8915d75790b3e095 Mon Sep 17 00:00:00 2001 From: Jonathan Chang Date: Tue, 24 Mar 2020 12:31:58 +1100 Subject: [PATCH] pr-publish: wording fixes --- Library/Homebrew/dev-cmd/pr-publish.rb | 4 ++-- Library/Homebrew/utils/github.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/dev-cmd/pr-publish.rb b/Library/Homebrew/dev-cmd/pr-publish.rb index c2a81d9e9e..f8da3b7b2f 100644 --- a/Library/Homebrew/dev-cmd/pr-publish.rb +++ b/Library/Homebrew/dev-cmd/pr-publish.rb @@ -21,7 +21,7 @@ module Homebrew def pr_publish pr_publish_args.parse - odie "You need to specify a pull request number!" if Homebrew.args.named.empty? + odie "You need to specify at least one pull request number!" if Homebrew.args.named.empty? args.named.each do |arg| arg = "#{CoreTap.instance.default_remote}/pull/#{arg}" if arg.to_i.positive? @@ -30,7 +30,7 @@ module Homebrew tap = Tap.fetch(user, repo) if repo.match?(HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX) odie "Not a GitHub pull request: #{arg}" unless issue ohai "Dispatching #{tap} pull request ##{issue}" - GitHub.dispatch(user, repo, "Publish ##{issue}", pull_request: issue) + GitHub.dispatch_event(user, repo, "Publish ##{issue}", pull_request: issue) end end end diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 7c3b36d284..eb6289d7a1 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -431,7 +431,7 @@ module GitHub comments.any? { |comment| comment["body"].eql?(body) } end - def dispatch(user, repo, event, **payload) + def dispatch_event(user, repo, event, **payload) url = "#{API_URL}/repos/#{user}/#{repo}/dispatches" open_api(url, data: { event_type: event, client_payload: payload }, request_method: :POST,