pr-publish: wording fixes

This commit is contained in:
Jonathan Chang 2020-03-24 12:31:58 +11:00
parent 5f53180b7c
commit 7c752e487f
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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,