Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
8ac96087
Commit
8ac96087
authored
4 years ago
by
Jonathan Chang
Browse files
Options
Downloads
Patches
Plain Diff
pr-publish: support dispatching with autosquash
parent
2d5ba777
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Library/Homebrew/dev-cmd/pr-publish.rb
+12
-1
12 additions, 1 deletion
Library/Homebrew/dev-cmd/pr-publish.rb
docs/Manpage.md
+4
-0
4 additions, 0 deletions
docs/Manpage.md
manpages/brew.1
+8
-0
8 additions, 0 deletions
manpages/brew.1
with
24 additions
and
1 deletion
Library/Homebrew/dev-cmd/pr-publish.rb
+
12
−
1
View file @
8ac96087
...
...
@@ -14,6 +14,12 @@ module Homebrew
Publish bottles for a pull request with GitHub Actions.
Requires write access to the repository.
EOS
switch
"--autosquash"
,
description:
"If supported on the target tap, automatically reformat and reword commits "
\
"in the pull request to our preferred format."
flag
"--message="
,
depends_on:
"--autosquash"
,
description:
"Message to include when autosquashing revision bumps, deletions, and rebuilds."
flag
"--tap="
,
description:
"Target tap repository (default: `homebrew/core`)."
flag
"--workflow="
,
...
...
@@ -30,6 +36,11 @@ module Homebrew
workflow
=
args
.
workflow
||
"publish-commit-bottles.yml"
ref
=
"master"
extra_args
=
[]
extra_args
<<
"--autosquash"
if
args
.
autosquash?
extra_args
<<
"--message='
#{
args
.
message
}
'"
if
args
.
message
.
presence
dispatch_args
=
extra_args
.
join
" "
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
...
...
@@ -40,7 +51,7 @@ module Homebrew
end
ohai
"Dispatching
#{
tap
}
pull request #
#{
issue
}
"
GitHub
.
workflow_dispatch_event
(
user
,
repo
,
workflow
,
ref
,
pull_request:
issue
)
GitHub
.
workflow_dispatch_event
(
user
,
repo
,
workflow
,
ref
,
pull_request:
issue
,
args:
dispatch_args
)
end
end
end
This diff is collapsed.
Click to expand it.
docs/Manpage.md
+
4
−
0
View file @
8ac96087
...
...
@@ -1119,6 +1119,10 @@ Find pull requests that can be automatically merged using `brew pr-publish`.
Publish bottles for a pull request with GitHub Actions.
Requires write access to the repository.
*
`--autosquash`
:
If supported on the target tap, automatically reformat and reword commits in the pull request to our preferred format.
*
`--message`
:
Message to include when autosquashing revision bumps, deletions, and rebuilds.
*
`--tap`
:
Target tap repository (default:
`homebrew/core`
).
*
`--workflow`
:
...
...
This diff is collapsed.
Click to expand it.
manpages/brew.1
+
8
−
0
View file @
8ac96087
...
...
@@ -1576,6 +1576,14 @@ Include pull requests that have failing status checks\.
Publish bottles for a pull request with GitHub Actions\. Requires write access to the repository\.
.
.TP
\fB\-\-autosquash\fR
If supported on the target tap, automatically reformat and reword commits in the pull request to our preferred format\.
.
.TP
\fB\-\-message\fR
Message to include when autosquashing revision bumps, deletions, and rebuilds\.
.
.TP
\fB\-\-tap\fR
Target tap repository (default: \fBhomebrew/core\fR)\.
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment