379 Commits

Author SHA1 Message Date
Maxim Belkin
2735663dc3
GitHub Actions: get username if we don't have it 2019-11-25 16:43:29 -06:00
Mike McQuaid
6d6d2c0bbf
utils/analytics: fix refactoring rename.
Fixes a bug from #6639.
2019-11-22 10:39:16 +00:00
Mike McQuaid
3a9f585ebb
Move more code to utils/analytics. 2019-11-22 09:10:29 +00:00
Mike McQuaid
28635a7fe4
Merge pull request #6723 from maxim-belkin/gh-actions/no-fork-prs
bump-formula-pr: enable same-repo (no-fork) Pull Requests
2019-11-22 09:06:48 +00:00
Maxim Belkin
c7f065b8da
utils/github.rb: use parallel assignments rather than indices
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2019-11-21 11:13:10 -06:00
Maxim Belkin
845f65b945
Factor out some code into functions 2019-11-21 11:13:10 -06:00
Alexander Bayandin
b7b5a60f86 utils/inreplace: do not allow to use empty list of files 2019-11-21 16:49:06 +00:00
Dawid Dziurla
f90612ccf0
bump-formula-pr: make it usable on linux
This commit makes it possible to use `bump-formula-pr` on linux to
contribute to `homebrew-core` as easily as it is on macOS, but with some
additional steps made before actual bumping of the formula.

Differences in the process (before bumping):
- add `homebrew-core` remote named `homebrew`
- fetch `homebrew/master`
- check if formula exists in `homebrew-core`
- switch to `homebrew/master` ref
2019-11-15 13:22:31 +01:00
Mike McQuaid
3609101728
utils/gems: fix finding bundler.
Need to specify the executable name not variable here.
2019-11-01 17:04:27 +00:00
Mike McQuaid
77531166d6
Use bundler from Ruby 2.6
Now Ruby comes with its own bundler let's favour using it when we can
over requiring a system one be installed.

This avoids needing to have anything in `~/.gem` again.

I am somewhat optimistic this may help with #6579 but it's useful
by itself.
2019-10-30 13:49:17 +00:00
Markus Reiter
d37831219d Use temp file for calculating hash. 2019-10-29 19:50:07 +01:00
Markus Reiter
7a5e4d1269 Remove User::automation_access?. 2019-10-22 07:38:35 +02:00
Markus Reiter
0a175c4feb
Merge pull request #6625 from reitermarkus/rubocop-namespace
Fix RuboCop namespace.
2019-10-22 01:46:05 +02:00
Markus Reiter
f099d44021 Add GitHub::create_check_run function. 2019-10-21 20:12:31 +02:00
Markus Reiter
6c03cc0040 Fix RuboCop namespace. 2019-10-21 20:09:56 +02:00
Mike McQuaid
cbf458ea9c
Lint/ElseAlignment: ignore some bugged autocorrections. 2019-10-14 09:03:02 +01:00
Issy Long
e5e28fbd69
Auto-fix more Layout/IndentationWidth offenses
- These didn't appear in the first pass as the other offense fixes caused them.
2019-10-13 16:04:30 +01:00
Issy Long
245c61017f
Auto-fix Layout/ElseAlignment offenses 2019-10-13 16:04:28 +01:00
Issy Long
341ea60807
Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
Mike McQuaid
e9aba2efb6
Require and provide portable Ruby 2.6.3. 2019-10-10 15:53:16 +01:00
Mike McQuaid
36bc11b01a
utils/shell: match preferred shell by symbol. 2019-10-08 12:10:31 +01:00
David O'Trakoun
5ca4b43383
Update Library/Homebrew/utils/shell.rb
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2019-10-07 10:25:41 -04:00
David O'Trakoun
960b8b659c
Support for zsh ZDOTDIR, FIX #6533
- Add test spec with ZDOTDIR set and unset
2019-10-06 12:40:18 -04:00
Markus Reiter
a49282c318 Simplify return value logic. 2019-10-04 23:39:26 +02:00
Markus Reiter
9df563f25f Add Tty::color?. 2019-10-04 23:39:25 +02:00
Markus Reiter
b1d0c61fea Update Gems. 2019-10-03 09:22:44 +02:00
Markus Reiter
0a1985d46a Disable curl globbing. 2019-10-01 08:38:44 +02:00
Markus Reiter
70822d2bdb Add workaround for curl: (56) Unexpected EOF. 2019-09-26 05:17:51 +02:00
Mike McQuaid
fbc13f05dd
utils/curl: extract status checks into method. 2019-09-18 10:32:13 +01:00
Caleb Xu
78a0105fe2 utils/curl.rb: accept 1xx HTTP status codes
RFC 2616 states:

A client MUST be prepared to accept one or more 1xx status responses
prior to a regular response, even if the client does not expect a 100
(Continue) status message. Unexpected 1xx status responses MAY be
ignored by a user agent.

In the rare cases that we encounter a formula URL with a server that
provides a preliminary 1xx status code, it seems that (at least during
audit) we are failing on encountering this status code, even though
retrieving the file will succeed without issues.
2019-09-17 11:01:03 -04:00
Markus Reiter
31f15acc01 Add GitHub::check_runs. 2019-09-13 22:30:25 +02:00
Markus Reiter
f010aa48ff Skip AppleScript actions if Automation Access isn't granted. 2019-09-13 16:35:44 +02:00
Cheng XU
4f29af08f8
github: redact token in the log 2019-07-18 15:10:15 +08:00
Cheng XU
739c06229d
curl/curl_output: allow redacting secrets in the log
Add a new argument `secrets` to specify secret tokens, so we can redact them in the log.
2019-07-18 15:10:15 +08:00
Maik Riechert
e113fd70be add HOMEBREW_CURL_RETRIES 2019-05-18 13:23:08 +01:00
Mike McQuaid
2e817d2644
utils/github: better handle blank scopes.
If both provided and required scopes are blank then we cannot display a
good error message so don't try.

Fixes #6134.
2019-05-15 09:18:05 +01:00
Frantisek Holop
6e691320f8 teach brew about mksh 2019-05-12 20:45:09 +02:00
Mike McQuaid
c4f72312ce
Fixup brew style failures. 2019-04-30 09:19:18 +01:00
kiendang
5c83729be9 Fix mutable string syntax 2019-04-26 23:03:40 +08:00
Mike McQuaid
261e2e7926
utils/github: fix frozen string usage.
See https://discourse.brew.sh/t/error-cant-modify-frozen-string/4691/4
2019-04-25 23:28:50 -07:00
Mike McQuaid
fc6bd2ea1c
Fixup more frozen string handling. 2019-04-20 14:07:29 +09:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
86f43f79ee
Enable/fix optional Ruby frozen string literal usage
Combined with https://github.com/Homebrew/homebrew-test-bot/pull/247
this will test Homebrew's use of frozen strings in CI. After this we
will then enable it for Homebrew developers and eventually all Homebrew
users.
2019-04-19 10:30:41 +09:00
Mike McQuaid
9e7b98d3e2
Don't check system Ruby is new enough when unnecessary.
We know this is the case in macOS >=10.13.3 so save a Ruby process call.
2019-04-18 21:42:28 +09:00
Mike McQuaid
ef2e297d3b
Disable RubyGems by default.
This speeds up all Ruby invocations where we don't need RubyGems by
around 10%. Where we do need RubyGems: include it manually.
2019-04-18 17:45:03 +09:00
EricFromCanada
89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04:00
EricFromCanada
fa6404e0f5 grammar fixes 2019-04-13 21:29:32 -04:00
kiendang
028b8b408d Remove use of bash 2019-03-20 20:19:33 +08:00
kiendang
00f74902d4 Call git log through bash for globstar support 2019-03-18 03:05:30 +08:00
kiendang
6be6bba0be brew extract from all taps 2019-03-17 23:44:35 +08:00