pr-publish: wording fixes
This commit is contained in:
parent
5f53180b7c
commit
7c752e487f
@ -21,7 +21,7 @@ module Homebrew
|
|||||||
def pr_publish
|
def pr_publish
|
||||||
pr_publish_args.parse
|
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|
|
args.named.each do |arg|
|
||||||
arg = "#{CoreTap.instance.default_remote}/pull/#{arg}" if arg.to_i.positive?
|
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)
|
tap = Tap.fetch(user, repo) if repo.match?(HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX)
|
||||||
odie "Not a GitHub pull request: #{arg}" unless issue
|
odie "Not a GitHub pull request: #{arg}" unless issue
|
||||||
ohai "Dispatching #{tap} pull request ##{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
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -431,7 +431,7 @@ module GitHub
|
|||||||
comments.any? { |comment| comment["body"].eql?(body) }
|
comments.any? { |comment| comment["body"].eql?(body) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def dispatch(user, repo, event, **payload)
|
def dispatch_event(user, repo, event, **payload)
|
||||||
url = "#{API_URL}/repos/#{user}/#{repo}/dispatches"
|
url = "#{API_URL}/repos/#{user}/#{repo}/dispatches"
|
||||||
open_api(url, data: { event_type: event, client_payload: payload },
|
open_api(url, data: { event_type: event, client_payload: payload },
|
||||||
request_method: :POST,
|
request_method: :POST,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user