131 Commits

Author SHA1 Message Date
Mike McQuaid
b3c33d34ab
Various sharding fixes
- Load paths with no API when needed (e.g. for `brew edit`)
- Use no API mode for `brew log` as it's needed there
- Define sharding format for homebrew-cask and homebrew-core inside
  `Tap` methods
- Create new formulae/casks in location defined by these `Tap` methods
- Fix a bug in Formulary that made sharded formulae lookup less
  efficient (and possibly broke it for core and some API usage)
- Fix various other hardcoded Formula/Cask directory assumptions

Co-authored-by: Bo Anderson <mail@boanderson.me>
2023-08-04 16:43:13 +01:00
Bo Anderson
9235024131
dev-cmd/pr-pull: fix branch warning conditions 2023-07-22 22:41:51 +01:00
Bo Anderson
bb7aef85db
Migrate remaining no-api commands to new scoped system 2023-06-22 17:11:20 +01:00
Carlo Cabrera
d7870bb24d
Move artifact download code to separate file
This will help avoid mutually-recursive `require`s.
2023-05-17 23:48:58 +08:00
Carlo Cabrera
d372eb86ca
utils/github: remove unnecessary chdir call
The only existing caller already has the requested directory as the
workign directory, so this is currently not needed.
2023-05-17 21:11:15 +08:00
Carlo Cabrera
05337cbb79
Refactor GitHub artifact downloads out of dev-cmd/pr-pull
I plan to use these in `test-bot` to download built bottles from
previous CI runs.
2023-05-17 21:11:15 +08:00
Douglas Eichelberger
08af78a2a5 brew style --fix 2023-04-25 09:26:24 -07:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Carlo Cabrera
2f37877858
git_repository: implement #to_s instead 2023-04-24 22:34:09 +08:00
Douglas Eichelberger
403f08db8b Remove delegation 2023-04-16 09:30:21 -07:00
Douglas Eichelberger
b90897e280 Create git_repo attr 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
a6fbf5f1ac brew style --fix 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
1ffb77f821 cleanup 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
8307255ce8 Update call sites 2023-04-15 19:35:13 -07:00
Carlo Cabrera
08fb8e441f
dev-cmd/pr-pull: add debug output for merge base 2023-03-29 17:56:05 +08:00
Carlo Cabrera
1ed8b3db2f
dev-cmd/pr-pull: handle non-cherry-picked commits in #autosquash! 2023-03-29 17:13:07 +08:00
Carlo Cabrera
b26d92ca9a
🐛 fixes 2023-03-28 23:07:03 +08:00
Carlo Cabrera
f0272b0944
dev-cmd/pr-pu{ll,blish}: handle PRs with an autosquash label
- request `autosquash` from the publish job in `pr-publish` if the PR is
  labelled with `autosquash`
- show a warning in `pr-pull` if called without `--autosquash` on a PR
  with the autosquash label.
2023-03-28 22:20:05 +08:00
Carlo Cabrera
834e4c98fc
dev-cmd/pr-*: replace --no-autosquash with --autosquash
We will now no longer be squashing commits by default, so it makes sense
to default to doing nothing but still autosquash commits when requested
with `--autosquash`.
2023-03-28 21:51:01 +08:00
Issy Long
61dc026fcc
rubocop: Remove the final Naming/MethodParameterName exceptions: pr
- Core RuboCop didn't want this shortening upstreamed, but that's OK!
2023-03-24 00:29:42 +00:00
Carlo Cabrera
e5b9e97b92
Use git merge-base to determine original_commit 2023-03-20 00:55:20 +08:00
Carlo Cabrera
c669f1d625
pr-pull: add --no-cherry-pick flag
Needed for Homebrew/homebrew-core#125556. Without this, `pr-pull`
attempts to cherry-pick commits from the PR branch onto the PR branch,
and then gets upset that nothing happened.

See https://github.com/Homebrew/homebrew-core/actions/runs/4461335852/jobs/7835095294#step:10:40
2023-03-19 23:44:44 +08:00
Douglas Eichelberger
f4c9a96c70 Enable types in dev-cmd 2023-03-14 08:32:03 -07:00
EricFromCanada
dfc9906184
internal messaging fixes 2023-02-10 23:17:16 -05:00
Bo Anderson
04f6f53b58
dev-cmd/pr-pull: avoid expensive search API calls 2022-09-03 21:19:37 +01:00
Carlo Cabrera
a82974974c
Update Library/Homebrew/dev-cmd/pr-pull.rb
Co-authored-by: Bo Anderson <mail@boanderson.me>
2022-08-05 21:51:39 +08:00
Carlo Cabrera
61544369e4
pr-pull: fix PRs conflicting with themselves
https://github.com/Homebrew/homebrew-core/pull/106755#issuecomment-1206460655
2022-08-05 21:41:28 +08:00
Michka Popoff
3eacc0fb7c
pr-pull: fix check conflicts
The previous refactorings broke the conflict check.
Go back to the initially proposed syntax to fill the hashes/arrays,
which is more readable, and which works (the proc syntax does not seem to work for our purpose here)

Remove space before the error message, else only the first line of the output has 2 spaces
and this looks weird
2022-08-04 23:34:52 +02:00
Michka Popoff
756c2b2c52
github/pr-pull: fix/improve parameters
Fixes #13634
2022-08-03 14:13:50 +02:00
Carlo Cabrera
b2cf1822fa
Fix brew style 2022-08-02 22:53:29 +08:00
Carlo Cabrera
8a169364a8
pr-pull: fix typo
Error: tried to create Proc object without a block
    Do not report this issue until you've run `brew update` and tried again.
    /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:372:in `proc'
    /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:372:in `pr_check_conflicts'
    /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:439:in `block in pr_pull'
    /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:429:in `each'
    /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:429:in `pr_pull'
    /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:93:in `<main>'
    Error: Process completed with exit code 1.

https://github.com/Homebrew/homebrew-core/runs/7634004090?check_suite_focus=true#step:10:15
2022-08-02 22:46:30 +08:00
Michka Popoff
374c3985d6
pr-pull: check for conflicts with long running builds
This change will prevent us having to run some long running builds
multiple times and to rely on luck to get things merged without conflicts.

The check takes less than 30 secondes on my local setup.
2022-08-01 23:34:06 +02:00
Mike McQuaid
2d5eab2e1c
brew style --fix 2022-06-30 08:56:21 +01:00
Mike McQuaid
1bb44979ee
Disable and delete code for 3.5.0
The next planned release will be 3.5.0 so let's fix things up for there.
2022-05-30 14:59:14 +01:00
Sean Molenaar
9a25a1d5e1
pr-pull: add checksum update clause 2022-04-26 08:57:29 +02:00
Sean Molenaar
0ec9cf721c
pr-pull: fix trailing whitespace 2022-04-04 14:19:39 +02:00
Sean Molenaar
08341d1c8b
pr-pull: whitespace fix 2022-04-04 14:14:00 +02:00
Sean Molenaar
0d8a3d8041
pr-pull: fix style
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-04-04 13:24:05 +02:00
Sean Molenaar
54e15cf361
pr-pull: allow pulling casks 2022-03-30 10:27:17 +02:00
Bo Anderson
ddeadaefce
dev-cmd/pr-pull: require unzip to be installed 2022-03-02 05:19:41 +00:00
Bo Anderson
e4159a7986
dev-cmd/pr-pull: consider alternative tap formula directories
Fixes #12939.
2022-03-01 16:39:09 +00:00
Mike McQuaid
38e1b3d64b
Deprecations, disables, deletions for 3.4.0 2022-02-22 14:28:32 +00:00
Carlo Cabrera
6baf2aadb6
pr-{publish,pull}: autosquash by default
This allows dispatching the publish workflow via the GitHub UI to have
the exact same behaviour as doing `brew pr-publish`.

Closes Homebrew/homebrew-core#94704.
2022-02-08 20:02:21 +08:00
Rylan Polster
2e6b6ab3a2
Fix style 2021-12-24 21:15:21 -05:00
Mike McQuaid
11c5f8f05a
Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:

- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependents
- automatically reinstalling broken dependents

For each of these: let's improve the documentation of the commands
whose behaviour is changed and the environment variables themselves.
2021-11-25 09:10:59 +00:00
fn ⌃ ⌥
35d6839b56 archive: delete 2021-09-30 09:50:04 -07:00
Nanda H Krishna
6bea9b4202
brew pr-pull: no bottles for CI-no-bottles PRs 2021-07-08 13:51:44 +05:30
Nanda H Krishna
b607fb0712
brew pr-{pull,upload}: remove --no-publish flag
The `--no-publish` flag isn't used anywhere since we removed all the
Bintray code. Also, the `--no-upload` flag used in `pr-pull` doesn't
apply the bottle commit, so its description has been modified.
2021-06-07 15:13:29 +05:30
Mike McQuaid
b914411ac8
Delete Bintray code
Remove all code related to Bintray. It no longer works so there's no
point keeping it around.

Some of this could arguably be deprecated/disabled first/instead but:
I'm not sure I see the sense in keeping stuff around that's known to be
broken.
2021-05-12 13:37:18 +01:00
Chris Wegrzyn
68852c9162 Style fix 2021-04-29 12:51:15 -04:00