dev-cmd/pr-*: allow to run on other taps too
This commit is contained in:
parent
6d27367c7e
commit
77a1bc22d7
@ -34,7 +34,6 @@ module Homebrew
|
||||
def pr_automerge
|
||||
pr_automerge_args.parse
|
||||
|
||||
ENV["HOMEBREW_FORCE_HOMEBREW_ON_LINUX"] = "1" unless OS.mac?
|
||||
without_labels = Homebrew.args.without_labels || ["do not merge", "new formula"]
|
||||
tap = Tap.fetch(Homebrew.args.tap || CoreTap.instance.name)
|
||||
|
||||
@ -59,7 +58,7 @@ module Homebrew
|
||||
end
|
||||
|
||||
if args.publish?
|
||||
safe_system "#{HOMEBREW_PREFIX}/bin/brew", "pr-publish", *pr_urls
|
||||
safe_system HOMEBREW_BREW_FILE, "pr-publish", *pr_urls
|
||||
else
|
||||
ohai "Now run:", " brew pr-publish \\\n #{pr_urls.join " \\\n "}"
|
||||
end
|
||||
|
@ -12,8 +12,10 @@ module Homebrew
|
||||
`pr-publish` [<options>] <pull_request> [<pull_request> ...]
|
||||
|
||||
Publish bottles for a pull request with GitHub Actions.
|
||||
Requires write access to the `homebrew/core` repository.
|
||||
Requires write access to the repository.
|
||||
EOS
|
||||
flag "--tap=",
|
||||
description: "Target tap repository (default: `homebrew/core`)."
|
||||
switch :verbose
|
||||
min_named 1
|
||||
end
|
||||
@ -22,14 +24,13 @@ module Homebrew
|
||||
def pr_publish
|
||||
pr_publish_args.parse
|
||||
|
||||
ENV["HOMEBREW_FORCE_HOMEBREW_ON_LINUX"] = "1" unless OS.mac?
|
||||
tap = Tap.fetch(Homebrew.args.tap || CoreTap.instance.name)
|
||||
|
||||
args.named.uniq.each do |arg|
|
||||
arg = "#{CoreTap.instance.default_remote}/pull/#{arg}" if arg.to_i.positive?
|
||||
arg = "#{tap.default_remote}/pull/#{arg}" if arg.to_i.positive?
|
||||
url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX
|
||||
_, user, repo, issue = *url_match
|
||||
odie "Not a GitHub pull request: #{arg}" unless issue
|
||||
tap = Tap.fetch(user, repo) if repo.match?(HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX)
|
||||
ohai "Dispatching #{tap} pull request ##{issue}"
|
||||
GitHub.dispatch_event(user, repo, "Publish ##{issue}", pull_request: issue)
|
||||
end
|
||||
|
@ -883,7 +883,10 @@ Find pull requests that can be automatically merged using `brew pr-publish`.
|
||||
### `pr-publish` [*`options`*] *`pull_request`* [*`pull_request`* ...]
|
||||
|
||||
Publish bottles for a pull request with GitHub Actions. Requires write access to
|
||||
the `homebrew/core` repository.
|
||||
the repository.
|
||||
|
||||
* `--tap`:
|
||||
Target tap repository (default: `homebrew/core`).
|
||||
|
||||
### `pr-pull` [*`options`*] *`pull_request`* [*`pull_request`* ...]
|
||||
|
||||
|
@ -1146,7 +1146,11 @@ Run \fBbrew pr\-publish\fR on matching pull requests\.
|
||||
Include pull requests that have failing status checks\.
|
||||
.
|
||||
.SS "\fBpr\-publish\fR [\fIoptions\fR] \fIpull_request\fR [\fIpull_request\fR \.\.\.]"
|
||||
Publish bottles for a pull request with GitHub Actions\. Requires write access to the \fBhomebrew/core\fR repository\.
|
||||
Publish bottles for a pull request with GitHub Actions\. Requires write access to the repository\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-tap\fR
|
||||
Target tap repository (default: \fBhomebrew/core\fR)\.
|
||||
.
|
||||
.SS "\fBpr\-pull\fR [\fIoptions\fR] \fIpull_request\fR [\fIpull_request\fR \.\.\.]"
|
||||
Download and publish bottles, and apply the bottle commit from a pull request with artifacts generated by GitHub Actions\. Requires write access to the repository\.
|
||||
|
Loading…
x
Reference in New Issue
Block a user