27429 Commits

Author SHA1 Message Date
Mike McQuaid
f39ab585b9
Further adjust HOMEBREW_AUTO_UPDATE_SECS
Add another case to update once an hour when developer commands have
been run.
2023-02-15 17:37:12 +00:00
Mike McQuaid
dfd4cd9b0c
analytics: update token.
We've deleted the old data and added a new bucket with a new token.
2023-02-15 17:32:34 +00:00
Mike McQuaid
769a8c5001
analytics: report to InfluxDB by default.
Now that this is ready: let's roll it out to everyone in 4.0.0.
2023-02-15 17:27:02 +00:00
Mike McQuaid
ba06013f72
Merge pull request #14583 from SMillerDev/fix/analytics/improve_keys
fix: add better keys and fuller values to influxDB analytics
2023-02-15 17:20:51 +00:00
Mike McQuaid
a5c4ce59ff
env_config: reduce api_auto_update_secs.
We're reducing this in formulae.brew.sh too.
2023-02-15 17:17:51 +00:00
Mike McQuaid
c5252817c2
analytics: refactor InfluxDB/Google handling. 2023-02-15 16:34:50 +00:00
Mike McQuaid
933cf0bd78
Merge pull request #14628 from dduugg/upgrade-type
Enable typing in Homebrew::Upgrade
2023-02-15 14:58:32 +00:00
Douglas Eichelberger
7fb87abefd
Enable typing in Homebrew::Upgrade 2023-02-15 14:24:58 +00:00
Douglas Eichelberger
4deb4c1813
Enable typing in Requirement classes 2023-02-15 14:22:03 +00:00
Issy Long
43a88cbd97
dev-cmd/contributions: Appease RuboCop 2023-02-15 14:04:05 +00:00
Issy Long
44edad85bc
dev-cmd/contributions: Add a grand total row to the CSV
```
$ brew contributions issyl0 --csv
The user issyl0 has made 1203 contributions in all time.
user,repo,commits,coauthorships,signoffs,total
issyl0,brew,333,13,0,346
issyl0,core,473,24,326,823
issyl0,cask,4,0,0,4
issyl0,aliases,0,0,0,0
issyl0,autoupdate,1,0,0,1
issyl0,bundle,14,2,0,16
issyl0,command-not-found,1,0,0,1
issyl0,test-bot,3,0,0,3
issyl0,services,9,0,0,9
issyl0,cask-drivers,0,0,0,0
issyl0,cask-fonts,0,0,0,0
issyl0,cask-versions,0,0,0,0
issyl0,*,*,*,*,1203
```
2023-02-15 14:00:05 +00:00
Issy Long
9aad9d011b
dev-cmd/contributions: Add a per-repo total column to the CSV
```
$ brew contributions issyl0 --csv
The user issyl0 has made 1202 contributions in all time.
user,repo,commits,coauthorships,signoffs,total
issyl0,brew,332,13,0,345
issyl0,core,473,24,326,823
issyl0,cask,4,0,0,4
issyl0,aliases,0,0,0,0
issyl0,autoupdate,1,0,0,1
issyl0,bundle,14,2,0,16
issyl0,command-not-found,1,0,0,1
issyl0,test-bot,3,0,0,3
issyl0,services,9,0,0,9
issyl0,cask-drivers,0,0,0,0
issyl0,cask-fonts,0,0,0,0
issyl0,cask-versions,0,0,0,0
```
2023-02-15 13:58:49 +00:00
Sean Molenaar
50e9247da4
fix: add better keys and fuller values to influxDB analytics 2023-02-15 14:12:05 +01:00
Issy Long
2719c345ab
dev-cmd/contributions: CSV output of queried repos; shorter sentence
- This gives users of this command a `--csv` option to pass to... you guessed
  it, generate a CSV that's `pbcopy`able elsewhere, for more granular
  breakdowns of where a person contributed.
- Inspiration was taken from the mockup in
  https://github.com/Homebrew/brew/issues/13642#issuecomment-1254535251
  but without the extra dependency of the TerminalTable gem.
- Always print a condensed "total contributions" sentence.

Output:

```
$ brew contributions issyl0
The user issyl0 has made 1201 contributions in all time.

$ brew contributions issyl0 --csv
user,repo,commits,coauthorships,signoffs
issyl0,brew,331,13,0
issyl0,core,473,24,326
issyl0,cask,4,0,0
issyl0,aliases,0,0,0
issyl0,autoupdate,1,0,0
issyl0,bundle,14,2,0
issyl0,command-not-found,1,0,0
issyl0,test-bot,3,0,0
issyl0,services,9,0,0
issyl0,cask-drivers,0,0,0
issyl0,cask-fonts,0,0,0
issyl0,cask-versions,0,0,0
```
2023-02-15 12:47:10 +00:00
Mike McQuaid
d87c7d718f
Merge pull request #14580 from carlocab/closed-prs
formula_auditor: allow references to merged PRs
2023-02-15 12:10:03 +00:00
Mike McQuaid
08c6b4556d
Merge pull request #14616 from reitermarkus/audit-cask-version
Add audit for versions containing colons or slashes.
2023-02-15 11:59:59 +00:00
Carlo Cabrera
72d8a50e7a
Disallow references to PRs that are closed but not merged 2023-02-15 16:18:48 +08:00
Mike McQuaid
17f19a85fe
Merge pull request #14637 from Bo98/api-git-clone 2023-02-15 07:25:46 +00:00
Bo Anderson
efc5088f85
formulary: fix git clone handling for API formulae 2023-02-15 05:31:23 +00:00
Bo Anderson
7ef0c48362
Fix analytics handling when core/cask taps are untapped 2023-02-15 05:31:08 +00:00
Bo Anderson
6e1b9ddb49
test/cask/cask_spec: fix test 2023-02-15 04:59:07 +00:00
Bo Anderson
724e3e646a
Merge pull request #14622 from Bo98/prefix.sh-api
prefix.sh: support API mode
2023-02-15 02:34:27 +00:00
BrewTestBot
7af0425793
sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2023-02-15 00:30:37 +00:00
Mike McQuaid
1d61b219db
cask/cask: fix non-absolute home error.
Needs a leading slash to avoid `File.expand.path` complaining about non-absolute home.
2023-02-14 17:22:18 +00:00
Mike McQuaid
237eec8ef8
Overhaul Formula/Cask JSON generation
- Use constants for placeholders
- Monkeypatch to set `HOMEBREW_PREFIX` consistently to placeholder
- Use environment variable to set `Dir.home` consistently to placeholder
- Use `appdir` short-circuit to set `Cask#appdir` consistently to placeholder
- Use `Cask.generating_hash!` to enable "generating mode" with these patches
- Fix `Formula#caveats` from JSON

Fixes #14505
Fixes #14595
2023-02-14 14:19:40 +00:00
Mike McQuaid
66c9d5f2af
Merge pull request #14620 from Kentzo/sudo-env
sudo: pass env variables without /usr/bin/env
2023-02-14 14:13:37 +00:00
Mike McQuaid
9725e764f5
system_command: fix typo. 2023-02-14 13:02:59 +00:00
DenizUgur
16b51d2a43 revert type check 2023-02-14 04:24:26 -08:00
Sanjito Kurniawan
2daae5e84d
edit: add HOMEBREW_NO_INSTALL_FROM_API warning. 2023-02-14 12:04:10 +00:00
DenizUgur
d80d94ab28 comments 2023-02-14 03:55:45 -08:00
Mike McQuaid
e0ba9a1249
Merge pull request #14617 from Bo98/api-reqs-oldname
formulary: support requirements, aliases etc from API
2023-02-14 11:54:55 +00:00
Issy Long
990170927a
Merge pull request #14597 from issyl0/contributions-add-signoffs
dev-cmd/contributions: Count commit signoffs, too
2023-02-14 11:37:08 +00:00
Mike McQuaid
72071f290e
Merge pull request #14623 from dduugg/type-api
Enabling typing in Homebrew::API module
2023-02-14 11:31:37 +00:00
Mike McQuaid
70db4bc723
Merge pull request #14621 from Bo98/api-uses_from_macos-fix
formulary: fix uses_from_macos handling on macOS
2023-02-14 11:24:44 +00:00
Mike McQuaid
d0d83cc03f
Merge pull request #14614 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-ast-1.26.0
build(deps): bump rubocop-ast from 1.24.1 to 1.26.0 in /Library/Homebrew
2023-02-14 11:17:44 +00:00
Mike McQuaid
8aa495b19b
Merge pull request #14618 from Bo98/maximum-req-name-fix
formula: fix `to_hash` tampering with requirement names
2023-02-14 11:14:51 +00:00
Issy Long
abe23fb249
dev-cmd/contributions: Add up different contribution types for a total
❯ brew contributions mikemcquaid
mikemcquaid directly authored 23766 commits, co-authored 241 commits, and signed-off 6730 commits across all Homebrew repos in all time. Total: 30737.
2023-02-14 10:51:13 +00:00
Mike McQuaid
aa7a543344
Merge pull request #14613 from MikeMcQuaid/improve_autotapping
Improve homebrew/{core,cask} autotapping.
2023-02-14 10:30:09 +00:00
DenizUgur
a9d1ee44c8 suggestion for linux compatibility 2023-02-14 02:24:20 -08:00
Mike McQuaid
4c8ed77302
Improve homebrew/{core,cask} autotapping.
Don't automatically tap these when running a developer command that's
not using the API.

Fixes #14606
2023-02-14 09:54:24 +00:00
DenizUgur
ff748ea030 change the default run_at_load value 2023-02-14 01:04:34 -08:00
DenizUgur
7d19ef7070 dedicated 'RunAtLoad' property 2023-02-13 23:19:34 -08:00
Ilya Kulakov
9ff7ceb563 sudo: pass env variables without /usr/bin/env
Using /usr/bin/env as a frontend for the actual command
prevents sudoers from restricting allowed commands and configuring
detailed command environment.
2023-02-13 22:10:35 -08:00
Bo Anderson
ca32473a67
prefix.sh: support API mode 2023-02-14 05:51:11 +00:00
Douglas Eichelberger
95742f4cfd Enabling typing in Homebrew::API module 2023-02-13 21:33:04 -08:00
apainintheneck
39c6f7d6fb Stop including *flight block source in cask API
Originally we were going to try and load the *flight blocks from the API
but we ended up going with downloading the caskfile for the subset of
casks that need this functionality for consisty's sake.

This reverts the following commits from most recent to oldest:
- ffc74a51fb32b66a4cd8bc41dbd076dd23d9100e
- e5616e94fe42505434c330be35eeafef2739944f
- d1490c3d5c087d00f2bca1787cce331202b195c5
- 7ca5a5d9a71a73f21bbb8555a38048f027bee89b
- 2d5d132713d0701d02d5ff33e9918812d13d2a83

It also changes how *flight blocks are handled in `.to_h`.
Essentially, when *flight blocks exist they are just included
as a hash of the artifact to nil to indicate that they exist.

More information isn't necessary since we don't evaluate
the current source code in the *flight artifacts that
we get from the API.
2023-02-13 21:22:18 -08:00
Bo Anderson
7c1b642035
formulary: fix uses_from_macos handling on macOS 2023-02-14 04:07:51 +00:00
Bo Anderson
9b26bf9b92
formulary: support requirements, aliases etc from API 2023-02-14 03:32:56 +00:00
Bo Anderson
5619e5cc2c
formula: fix to_hash tampering with requirement names 2023-02-14 02:31:49 +00:00
Markus Reiter
cd18703582
Add audit for versions containing colons or slashes. 2023-02-14 02:08:56 +01:00