Bo Anderson
22cb5dbf02
utils/gems: redirect bundler output to stderr
2023-09-27 20:05:03 +01:00
Bo Anderson
582049454f
vendor/bundle/ruby: cleanup unneeded files
2023-09-26 18:39:57 +01:00
apainintheneck
85bd4c7e1f
utils/backtrace: scrub sorbet-runtime from backtrace
...
Ever since we started using this at runtime it's been polluting
the backtrace output. This makes it harder to debug errors and
increases the amount of info users have to paste into the box
when filing an issue.
This is a very direct approach. Essentially, we strip out
everything related to the `sorbet-runtime` gem whenever the top
line in the backtrace is unrelated to sorbet-runtime.
The hope is that this will allow errors related to sorbet to
be diagnosed easily while also reducing the backtrace size
for all other types of errors.
Sometimes it is useful to see the full backtrace though.
For those cases, we include the full backtrace when
`--verbose` is passed in and print a warning that the
Sorbet lines have been removed from the backtrace the
first time they are removed.
Note: This requires gems to be set up so that the call to
`Gem.paths.home` works correctly. For that reason, it must
be included after `utils/gems` which is included in
`standalone/load_path` already.
2023-09-21 21:07:22 -07:00
Bo Anderson
dd17799d0a
utils/gems: don't allow Sorbet to install on Sonoma's system Ruby
2023-09-13 19:14:18 +01:00
Mike McQuaid
b415a0dba6
Merge pull request #15952 from Bo98/gemgroup-file
...
Move gem group setting to separate, cacheable file
2023-09-13 14:25:59 +01:00
Bo Anderson
9cf0d34ee0
Move gem group setting to separate, cacheable file
2023-09-13 14:04:13 +01:00
Mike McQuaid
0454669656
utils/shared_audits: handle 404 metadata errors from GitLab API.
...
Fixes #15995 .
2023-09-13 09:31:34 +01:00
Eric Knibbe
931f762598
docs+rubydoc: various grammar/wording fixes
2023-09-11 02:26:37 -04:00
Mike McQuaid
8c1c0c5a22
utils/github: fully scope curl usage.
...
Fixes #15965
2023-09-05 17:07:59 -04:00
Mike McQuaid
e02ec5e07a
Merge pull request #15961 from MikeMcQuaid/fix_missing_curl
...
utils/github/artifacts: fix missing Utils::Curl reference.
2023-09-05 08:07:09 -04:00
Mike McQuaid
84973da037
utils/github/artifacts: fix missing Utils::Curl reference.
...
Needed after https://github.com/Homebrew/brew/pull/15940
2023-09-05 07:52:39 -04:00
Mike McQuaid
b7114651ac
utils/curl: include or use explicitly.
...
Include or use `Utils::Curl` explicitly everywhere it is used.
2023-09-04 22:17:57 -04:00
Mike McQuaid
d5a1f3e02c
api: use Utils::Curl.curl_args
...
This sets user-agent nicely and avoids some duplication.
2023-09-02 21:31:01 -04:00
Mike McQuaid
d357607b2c
dev-cmd/contributions: usability/performance improvements.
...
- more sensible/performant defaults: default to primary repositories
only for the last year rather than all repositories forever
- allow specifying more than one user at a time
- output the breakdown of contributions without needing `--csv`
- add a space before the `--csv` output
- consolidate some code
- avoid counting authored commits twice, to improve performance
- retry failed GitHub API calls (this happens often when querying all
maintainers)
- stop counting after we find 1000 commits for a given user to avoid
excessive API queries/pagination
2023-08-30 15:08:50 +01:00
Alexander Bayandin
45378f35e2
get_repo_license: ignore ip allowlist error
2023-08-26 17:16:43 +01:00
Alexander Bayandin
89d52f19a9
shared_audits: allow GitHub's IP not permitted error
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-08-26 14:53:38 +01:00
Branch Vincent
47e82add43
utils/pypi: exclude deps of excluded packages
2023-08-21 21:45:54 -07:00
Muneeb Ahmed
8a14d5cf4e
Fix cask dependency discovery
2023-08-17 04:16:02 -07:00
Bo Anderson
fdd18a4b79
utils/gems: update to Bundler 2.4
2023-08-16 01:34:16 +01:00
Clint Harrison
4ade9351e4
Allow HOMEBREW_CURLRC to provide a path for curl --config
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2023-08-15 11:29:02 +01:00
Douglas Eichelberger
d01cda2815
Turn up the types
2023-08-12 22:01:22 -07:00
Mike McQuaid
d313e8b027
Merge pull request #15824 from dduugg/inreplace-static
...
Make inreplace a purely static method v2
2023-08-08 12:32:10 +01:00
Douglas Eichelberger
5d5c22e104
Replace integration test with unit test
2023-08-07 18:32:08 -07:00
Douglas Eichelberger
2b29c498fa
s/blk/block
2023-08-07 17:26:46 -07:00
Branch Vincent
e5ed11a5b7
pypi: support updating resources for git clones
2023-08-05 17:12:23 -07:00
Douglas Eichelberger
864f31e52a
Forward block argument
2023-08-04 16:20:56 -07:00
Douglas Eichelberger
efd02b956d
Revert "Revert "Make inreplace
a purely static method""
...
This reverts commit 8656caa67ce2dd9ec6484969b183c1fd7805451e.
2023-08-04 16:20:38 -07:00
Alexander Bayandin
8656caa67c
Revert "Make inreplace
a purely static method"
2023-08-03 16:16:19 +01:00
Douglas Eichelberger
da33049c69
Resolve Style/OptionalBooleanParameter violation
2023-08-02 14:47:06 -07:00
Douglas Eichelberger
2ad87f87d5
Make inreplace a purely static method
2023-08-02 09:44:18 -07:00
Eric Knibbe
c1fe80ac82
utils/repology: update API URL
2023-08-02 09:02:44 -04:00
Douglas Eichelberger
b26c0917c7
Widen collection type in super call
2023-08-01 09:33:04 -07:00
Douglas Eichelberger
8d8dac0de4
Narrow member type of inreplace paths enumerable
2023-08-01 09:22:48 -07:00
Mike McQuaid
dda839c27b
analytics: fix @
in formulae names with --github-packages-downloads
2023-07-26 16:46:23 +01:00
William Woodruff
81b768a978
utils/pypi: fix an incorrect return type
...
Signed-off-by: William Woodruff <william@yossarian.net>
2023-07-25 10:36:49 -04:00
Douglas Eichelberger
08e46c18cd
Add type to Formula attrs
2023-07-24 14:12:36 -07:00
Douglas Eichelberger
11bb278284
Support Pathname as second arg to gsub!
2023-07-23 21:14:21 -07:00
Douglas Eichelberger
cec3daf6be
Fix type regression
2023-07-23 19:48:48 -07:00
Douglas Eichelberger
c7369b7ea9
Strict type string_inreplace_extension
2023-07-23 15:56:26 -07:00
Carlo Cabrera
fa384b7cc3
utils/inreplace: fix typechecking error
...
Fixes
TypeError: Parameter 'before': Expected type T.nilable(T.any(Regexp, String)), got type Pathname with value #<Pathname:/opt/homebrew/Cellar/php@8.1/8.1.21/lib/php>
Caller: /opt/homebrew/Library/Homebrew/formula.rb:2484
Definition: /opt/homebrew/Library/Homebrew/utils/inreplace.rb:48
https://github.com/Homebrew/homebrew-core/actions/runs/5635089949/job/15266014851#step:3:1737
2023-07-23 18:23:04 +08:00
Douglas Eichelberger
af5cdd1590
Allow implicit String Pathname in gsub
2023-07-22 10:20:52 -07:00
Douglas Eichelberger
11a9086b89
Fix inreplace sig
...
Implicit Pathname strings strike again
2023-07-21 20:02:59 -07:00
Bjorn Neergaard
a5554df6bb
utils/github/api: fix credentials_type
...
The order is shared with self.credentials, but during the deprecation
cycle the need to adjust self.credentials_type to match was overlooked.
2023-07-19 14:58:12 -06:00
Mike McQuaid
93ba81208c
Merge pull request #15690 from p-linnane/fix-various-typos
...
various: fix miscellaneous typos
2023-07-18 17:26:41 +01:00
Mike McQuaid
79e67737a2
Merge pull request #15692 from dtrodrigues/pypi_version
...
utils/pypi: don't overwrite name/extras/version from basic_metadata if already set
2023-07-18 17:15:57 +01:00
Patrick Linnane
c56669e9cd
various: fix miscellaneous typos
2023-07-18 08:52:49 -07:00
Mike McQuaid
16a36a0910
utils/analytics: new InfluxDB token.
...
This is created with a different user that's more desirable.
2023-07-18 16:22:23 +01:00
Mike McQuaid
77061817f7
Fix (again) InfluxDB analytics messaging
...
Address https://github.com/Homebrew/brew/pull/15688#issuecomment-1638725595
Fixes https://github.com/Homebrew/brew/issues/15678
2023-07-18 08:03:57 +01:00
Dustin Rodrigues
b12f714a44
utils/pypi: don't overwrite name/extras/version from basic_metadata if already set
2023-07-17 21:50:26 -04:00
Mike McQuaid
c2ce8e7033
utils/analytics: hide InfluxDB message correctly.
...
Fixes #15678
2023-07-17 19:26:10 +01:00