2832 Commits

Author SHA1 Message Date
Mike McQuaid
8d71aa02dd
Merge pull request #14918 from SMillerDev/master
bump-formula-pr: add release notes if found
2023-03-08 14:02:36 +00:00
Sean Molenaar
2f32da0455
fix syntax 2023-03-08 14:28:34 +01:00
Sean Molenaar
9bd567aab9
Update Library/Homebrew/dev-cmd/bump-formula-pr.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-03-08 14:04:28 +01:00
Sean Molenaar
048ed5d683
Update Library/Homebrew/dev-cmd/bump-formula-pr.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-03-08 13:59:14 +01:00
Sean Molenaar
8532bb23cc
Update Library/Homebrew/dev-cmd/bump-formula-pr.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-03-08 13:58:45 +01:00
Mike McQuaid
e5c0fb4ca6
Merge pull request #14892 from apainintheneck/irb-improvements
`brew irb` improvements
2023-03-08 12:46:56 +00:00
apainintheneck
deabd4a5f9 Change history and config file dirs
Now both REPL history is written to $HOME.
- Pry: $HOME/.brew_pry_history
- IRB: $HOME/.brew_irb_history

The IRB config file has also been moved to the
library directory.
2023-03-07 19:15:05 -08:00
Nanda H Krishna
3113b44d1f
brew unbottled: fix XcodeRequirement handling on Linux 2023-03-07 14:12:40 -05:00
Sean Molenaar
139f90df97
bump-formula-pr: add release notes if found 2023-03-07 19:44:35 +01:00
Mike McQuaid
2fe078d448
Merge pull request #14902 from g0t4/cat_mention_brew_info_github
when `brew cat` fails, suggest `brew info --github`
2023-03-07 09:29:06 +00:00
Mike McQuaid
a6b70eee69
Merge pull request #14896 from issyl0/sorbet-autogenerate-tty-rbi
sorbet: Autogenerate the RBI file for `utils/tty.rb`
2023-03-07 09:23:02 +00:00
apainintheneck
9f7ab25af5 irb: improve pry config
The idea here is that the pry session history
should be separate for homebrew than the global
pry history.

We also ignore any .pryrc files so that they
don't interfere with this config.
2023-03-06 22:37:09 -08:00
apainintheneck
6ab6d7c8ee irb: save repl history
This enables history for `brew irb` sessions.
It saves that history to the repository directory.
2023-03-06 22:24:14 -08:00
Douglas Eichelberger
d56e2884aa Enable typing in cmd/ 2023-03-06 15:01:08 -08:00
Issy Long
48802daf01
sorbet: Regenerate homegrown RBI files with brew typecheck --update
- I needed to add some more `require`s to the `tty.rb` generator script
  since it failed to recognise `env_config` and Sorbet's `T` setup if I
  ran it not via `brew ruby`, and I couldn't get `brew ruby` to work
  within `safe_system` in the `typecheck` dev-cmd.
2023-03-06 21:46:05 +00:00
Wes Higbee
66c268b190
rearrange output to easily copy command suggestion 2023-03-06 13:43:28 -06:00
Wes Higbee
12d93c480f
include formula/cask args in brew info --github suggestion 2023-03-06 13:34:05 -06:00
Wes Higbee
1e95de4757
split up suggestions 2023-03-06 07:51:36 -06:00
Wes Higbee
ba7ffb2db8
mention alternative in brew cat failure message 2023-03-06 07:44:27 -06:00
Mike McQuaid
b08029edc9
Merge pull request #14885 from apainintheneck/irb-add-cask-monkey-patch
irb: add cask monkey patch
2023-03-06 12:28:12 +00:00
apainintheneck
11a0ea1833 irb: enable global options
The --debug and --quiet options weren't working before
with the REPL because IRB didn't recognize them.
2023-03-05 10:22:34 -08:00
Issy Long
edeefebf61
utils/github: Fix double counting of author/committer numbers
- The usage of this in `brew contributions` wasn't correct for a user
  with 5 authored commits to homebrew/cask that had been committed by
  other people, the numbers would turn out as 5 authored, 5 committed.
- I decided to do this properly by getting the SHAs for author and
  committer and determine the differences between the two arrays.
  This also accounts for when authored commits are 0, or committed
  commits, or both.
- Add tests, because I don't want to fix this a third time!
2023-03-05 14:41:04 +00:00
apainintheneck
73f0fc3f1a brew/irb: add cask monkey patch
This makes it easier to load casks in repl sessions
and matches what we already do with formulae.
2023-03-04 12:25:08 -08:00
Issy Long
693d609730
dev-cmd/contributions: Fix authored vs. committed commit uniqueness
- For a situation where `authored = 3`, `committed = 4`, the previous
  calculation was `3 - 4` which meant that `committed = -1` in the end.
- This was incorrect, since a user can't have negative contributions!
- Instead, only do the subtraction to get the deduplicated `committed`
  count if the number of authored commits is higher than the number of
  committed commits. This approach should achieve the desired "don't
  double count things that the user authored and committed, but do count
  things that another person authored that the user committed".
2023-03-03 13:15:13 +00:00
Issy Long
fcb01e49a2
dev-cmd/contributions: Deduplicate same author/committer commits
- Double counting is artificially inflating folks' contributions (sadly ;-)).
- Since I'm not going to enumerate every possible author to filter by *both*
  fields via the API, let's do some arithmetic to figure out the unique
  committer numbers for a user.
2023-03-02 20:19:19 +00:00
Issy Long
4be55ddcc4
dev-cmd/contributions: Tidy up comments for data structures
- People can `pp results` or `pp totals`, updating these is getting tedious.
2023-03-01 23:45:08 +00:00
Issy Long
9250a6705e
dev-cmd/contributions: Count the number of commits a user committed
- The GitHub list commits API now supports this filtering
  (https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#list-commits--parameters),
  because I wrote it. :-)
- Authoring a commit and committing a commit are two separate concepts: author
  is the person who wrote the code and, in old parlance, the committer is the
  person who applied the patch (remember when we sent patches to mailing lists?).
- In practice for us in Homebrew, this occurs when we make a change in GitHub's
  web editor, or, more obviously, when BrewTestBot pushes `homebrew-core`
  commits from users (then, `BrewTestBot` is the `committer`).
2023-03-01 23:38:49 +00:00
Bo Anderson
c32a1b8104
dev-cmd/tests: ignore BuildPulse failures for now 2023-03-01 22:21:45 +00:00
Bo Anderson
f4067ac5fe
dev-cmd/tests: better output for BuildPulse failures 2023-03-01 20:42:50 +00:00
Mike McQuaid
7c15dce285
Merge pull request #14798 from MikeMcQuaid/deprecate_shell
Deprecate `preferred_shell` and `shell_profile`.
2023-02-28 15:18:00 +00:00
Mike McQuaid
32463227ac
Deprecate preferred_shell and shell_profile.
I know that we're outside our normal deprecation cycle but: these are
totally broken with the API and it doesn't make sense to support them
only for non-core formulae.
2023-02-28 15:02:06 +00:00
Issy Long
b8b7e6350d
dev-cmd/contributions: Only count approving reviews
- The `reviewed-by` filter retrieved all reviews for a user, including
  those they'd added to their own PRs. Since it's impossible to click
  the "approve" button on one's own PR, filter this to `review:approved`
  to get "further project goals" kinds of reviews.
- Suggested in https://github.com/Homebrew/brew/pull/14813#discussion_r1118696385.
2023-02-28 12:58:21 +00:00
Rylan Polster
f6af334397
Merge pull request #14825 from MikeMcQuaid/more_sharding_fixes
More Formula/Casks sharding fixes
2023-02-28 07:08:29 -05:00
Mike McQuaid
0406279ad3
More Formula/Casks sharding fixes
- Stop `brew style` from complaining
- Fix message reference in `brew edit`
2023-02-28 11:52:38 +00:00
Issy Long
0f2270e9ef
Merge pull request #14819 from issyl0/signoffs-were-just-a-stepping-stone-to-reviews
dev-cmd/contributions: Stop counting signoffs now we have "real" reviews
2023-02-28 11:37:14 +00:00
Issy Long
6b76e5e66f
dev-cmd/contributions: Stop counting signoffs now we have "real" reviews
- Signoffs were just a stopgap until we implemented getting "real"
  reviews for a user via the GitHub API. They were a suboptimal way of getting
  reviews because they only really exist in Homebrew/homebrew-core where
  BrewTestBot adds signoffs for each maintainer who reviewed the PR.
2023-02-28 11:12:51 +00:00
Douglas Eichelberger
f9f73f3ef6 Tidy up 2023-02-27 21:42:47 -08:00
Douglas Eichelberger
1ab278f74c Fix style/type violations 2023-02-27 20:34:07 -08:00
Douglas Eichelberger
0eccc0e987 git grep -l Utils::Inflection | xargs gsed -i 's|Utils::Inflection|Utils|g' 2023-02-27 20:18:27 -08:00
Douglas Eichelberger
3da68651e5 Port more call sites 2023-02-27 20:18:08 -08:00
Mike McQuaid
6db7732fa3
Merge pull request #14821 from issyl0/support-date-ranges-in-pr-reviews-query
dev-cmd/contributions: Support date ranges in PR reviews query
2023-02-28 00:06:41 +00:00
Mike McQuaid
d6ba3878ab
dev-cmd/cat: improve error message.
Fixes #14815.

Co-authored-by: Adrian Ho <the.gromgit@gmail.com>
2023-02-27 17:34:29 +00:00
Issy Long
a2d31faa72
dev-cmd/contributions: Support date ranges in PR reviews query
- Now `brew contributions --from=2023-02-23 --to=2023-02-26` works to limit the
  results for reviews. I forgot this in the original implementation, again,
  ugh.
2023-02-26 23:34:53 +00:00
Issy Long
a13556a1a6
Merge pull request #14813 from issyl0/contributions-approvals 2023-02-26 15:23:11 +00:00
Issy Long
8c75eab88a
dev-cmd/contributions: Count PR reviews since they're super important
- The search APIs don't have that high a rate limit but we shouldn't need to
  worry about that too much because, to get counts, the JSON response comes
  with a `total_count` number.
2023-02-25 19:10:17 +00:00
Issy Long
7b8f1c8714
dev-cmd/contributions: Order the CSV by highest contributions total 2023-02-25 18:04:01 +00:00
Issy Long
428193aa29
Merge pull request #14789 from issyl0/contributions-maintainers-csv
dev-cmd/contributions: CSV output of totals per maintainer
2023-02-25 17:51:59 +00:00
Issy Long
e68379f5df
dev-cmd/contributions: Fill in the "total" CSV row
- Using the new "total across commits/coauthors/signoffs" data per-user,
  this also generates a more complete maintainers CSV.
2023-02-25 01:05:41 +00:00
Bo Anderson
e86a8c2477
Move HOMEBREW_NO_INSTALL_FROM_API defaults to shell 2023-02-24 21:53:08 +00:00
Bo Anderson
51e0c685f8
Merge pull request #14801 from Bo98/generate-errors
generate-*-api: better errors
2023-02-24 17:15:32 +00:00