Merge pull request #7332 from dawidd6/pr-uniq

pr-*: only unique named args
This commit is contained in:
Mike McQuaid 2020-04-12 13:31:54 +01:00 committed by GitHub
commit 6b30a64831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -9,7 +9,7 @@ module Homebrew
def pr_publish_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`pr-publish` <pull_request>
`pr-publish` [<options>] <pull_request> [<pull_request> ...]
Publishes bottles for a pull request with GitHub Actions.
Requires write access to the repository.
@ -25,7 +25,7 @@ module Homebrew
odie "You need to specify at least one pull request number!" if Homebrew.args.named.empty?
args.named.each do |arg|
args.named.uniq.each do |arg|
arg = "#{CoreTap.instance.default_remote}/pull/#{arg}" if arg.to_i.positive?
url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX
_, user, repo, issue = *url_match

View File

@ -11,7 +11,7 @@ module Homebrew
def pr_pull_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`pr-pull` <pull_request>
`pr-pull` [<options>] <pull_request> [<pull_request> ...]
Download and publish bottles, and apply the bottle commit from a
pull request with artifacts generated from GitHub Actions.
@ -159,7 +159,7 @@ module Homebrew
setup_git_environment!
args.named.each do |arg|
args.named.uniq.each do |arg|
arg = "#{tap.default_remote}/pull/#{arg}" if arg.to_i.positive?
url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX
_, user, repo, pr = *url_match

View File

@ -884,12 +884,12 @@ Generate Homebrew's manpages.
* `--link`:
This is now done automatically by `brew update`.
### `pr-publish` *`pull_request`*
### `pr-publish` [*`options`*] *`pull_request`* [*`pull_request`* ...]
Publishes bottles for a pull request with GitHub Actions. Requires write access
to the repository.
### `pr-pull` *`pull_request`*
### `pr-pull` [*`options`*] *`pull_request`* [*`pull_request`* ...]
Download and publish bottles, and apply the bottle commit from a pull request
with artifacts generated from GitHub Actions. Requires write access to the

View File

@ -1128,10 +1128,10 @@ Return a failing status code if changes are detected in the manpage outputs\. Th
\fB\-\-link\fR
This is now done automatically by \fBbrew update\fR\.
.
.SS "\fBpr\-publish\fR \fIpull_request\fR"
.SS "\fBpr\-publish\fR [\fIoptions\fR] \fIpull_request\fR [\fIpull_request\fR \.\.\.]"
Publishes bottles for a pull request with GitHub Actions\. Requires write access to the repository\.
.
.SS "\fBpr\-pull\fR \fIpull_request\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 from GitHub Actions\. Requires write access to the repository\.
.
.TP