1289 Commits

Author SHA1 Message Date
Sean Molenaar
3567892802
Add notibility checks for casks 2020-05-26 14:21:25 +02:00
Issy Long
d14eed6cec
audit: Remove call to deprecated created_pr_comment method
```
➜ brew audit --online --new-formula --verbose turbogit
turbogit:
  * GitHub repository not notable enough (<30 forks, <30 watchers and <75 stars)
  * GitHub repository too new (<30 days old)
Error: undefined local variable or method `created_pr_comment' for Homebrew:Module
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:148:in `audit'
/usr/local/Homebrew/Library/Homebrew/brew.rb:110:in `<main>'
```

- This was removed in 4f75a77b089e65ff9e03c65d192808aa4ea6842f. We can't
  post PR comments from GitHub Actions CI from forks.
2020-05-25 13:00:38 +01:00
Issy Long
0cced8e7bd
audit: Fix Regexp for stripping .git from repo URLs
- [For a formula named
  turbogit](https://github.com/Homebrew/homebrew-core/pull/55208), we
  didn't see any of the notability checks fail CI.
- The repo name was getting truncated to `turb`, which didn't exist, so
  the audit didn't return anything for this check.
- The Regexp to strip `.git` from the end of was not escaping the `.`,
  so it would match anything ending in `git`, not a literal `.git`.
2020-05-25 12:48:16 +01:00
Mike McQuaid
ef95b59ed4
Remove HomebrewArgvExtension
Fixes #5730
2020-05-23 19:39:11 +01:00
Mike McQuaid
e1f3c8d2b3
Merge pull request #7579 from MikeMcQuaid/deprecations
Update deprecations
2020-05-23 14:38:10 +01:00
Zhiming Wang
83fa24741e
bump-formula-pr: fix forking error when formula is guessed from url
Regression introduced in f90612ccf0db03681dc6cbf6585cca5bc27b84b1 (#6718).

`tap_full_name` returned from `use_correct_linux_tap` has been
required (`GitHub.create_fork(tap_full_name)`), but it was never set when the
formula is guessed from args.url, resulting in an API request to
https://api.github.com/repos//forks which 404s (note the missing :owner/:repo),
and subsequently

    Error: Unable to fork: Not Found!
2020-05-23 14:20:35 +08:00
Mike McQuaid
ca47992a6c
Fix rubocop-performance brew style. 2020-05-22 08:52:26 +01:00
Mathäus Zingerle
bb9665ced8 Migrate scheme checks for cvs, bzr, hg, fossil, and svn+http to Rubocop 2020-05-20 20:52:00 -05:00
Mike McQuaid
633501ab08
audit: remove incorrect TODO.
This check can't really be in RuboCop (as it relies on the URL strategy
logic).
2020-05-20 08:17:14 +01:00
Mike McQuaid
0e9897c86d
Merge pull request #7577 from vidusheeamoli/add-byebug
Set up Byebug debugger
2020-05-19 08:27:53 +01:00
Mathäus Zingerle
82ba0475ad audit: Port version checks that do not rely on Formula state to RuboCop and add tests 2020-05-18 10:12:13 -05:00
Mike McQuaid
4f75a77b08
Update deprecations
Add more deprecations, disable deprecations and remove disabled code.
2020-05-18 13:50:46 +01:00
vidusheeamoli
4f1e9f44a1 set up byebug debugger 2020-05-18 16:28:43 +05:30
Bo Anderson
65d7036c19 bintray: url encode where needed 2020-05-10 01:48:29 +01:00
Dawid Dziurla
6fa09ab0ee
pr-automerge: match only approved PRs by default
Also remove default `--with-label` value and add `--without-approval`
option.

Reviews could be automatically dismissed on new commits pushed (there is
an option for that in repository settings on Github). That is not the
case for labels. They remain attached to a PR, even when new commits are
pushed. This is undesirable and creates security concerns, because
someone could introduce untested code just before the automerge happens.

Co-authored-by: Eric Knibbe <enk3@outlook.com>
2020-05-06 18:32:47 +02:00
Mike McQuaid
20a1199375
Refactor CLI to remove unless args_parsed
Refactor the CLI::Args module so it doesn't have different paths to
check arguments depending on whether the arguments have been parsed or
not. Instead, set the values we need from the global ARGV at
first, global initialisation time where they will be thrown away when
the actual arguments are parsed.

To do this some other general refactoring was needed:
- more methods made private when possible
- e.g. `HEAD?` used consistently instead of `head` before arguments
  are parsed.
- formula options are only parsed after named arguments are extracted
2020-05-05 17:47:51 +01:00
vidusheeamoli
f851688541 audit: Port audit_keg_only to rubocop and add tests
audit: add test

audit: fixed test

audit: added another test case

audit: fix test

audit: fix test

audit: fix keg only
2020-05-05 10:47:49 +05:30
Mike McQuaid
40ec8e69cc
Cleanup Sandbox code
Remove unused code and methods.
2020-05-02 13:45:04 +01:00
Alexander Bayandin
cc799b1f31 dev-cmd/mirror: switch to Bintray wrapper 2020-04-27 23:17:25 +01:00
EricFromCanada
5a4a57310f bump-revision: insert after homepage if stable block is present 2020-04-26 15:13:34 +01:00
Alexander Bayandin
7ba0f34f72 Revert "Merge pull request #7316 from bayandin/fix-bump-revision"
This reverts commit a7fdc7046f5cda8743591040117e409cd24dae76, reversing
changes made to bfa175d118112989b24908ea16c5a97c1dd011e4.
2020-04-26 15:11:31 +01:00
Mike McQuaid
a7fdc7046f
Merge pull request #7316 from bayandin/fix-bump-revision
bump-revision: fix handling formula with stable block
2020-04-26 13:31:45 +01:00
EricFromCanada
78b87b7f23 sh: fix custom shell prompt for zsh 2020-04-23 00:38:36 -04:00
Bo Anderson
b619e31457 dev-cmd/audit: fix false openssl@1.1 versioned formula audit 2020-04-22 01:00:35 +01:00
Shaun Jackman
6b547a5c5e pr-upload: Fix a bug introduced by PR #7406
Fix the error:
Error: No such file or directory @ rb_sysopen - bottle
2020-04-20 15:16:08 -07:00
Mike McQuaid
6d999f95d2
Merge pull request #7406 from sjackman/pr-upload-root-url
pr-upload: Add argument root-url
2020-04-20 20:12:59 +01:00
Mike McQuaid
9457d1af5e
pull: fix head_revision definition.
Fixes #7405.
2020-04-20 19:54:38 +01:00
Shaun Jackman
29ae567868 pr-upload: Add argument root-url
The argument root-url is needed for third-party taps.
2020-04-20 11:47:57 -07:00
Mike McQuaid
c4fed07d34
Merge pull request #7401 from dawidd6/pr-upload
Add pr-upload command
2020-04-20 16:33:06 +01:00
Dawid Dziurla
3dd5a7465d
add pr-upload command 2020-04-20 13:37:05 +02:00
Mike McQuaid
8b84ef5dc8
pull: cleanup more code.
Remove more unused code.
2020-04-20 10:09:22 +01:00
EricFromCanada
9d6eb41fc5 cmd/dev-cmd: misc. usage and wording fixes 2020-04-19 13:31:54 -04:00
Mike McQuaid
ef3b148147
Merge pull request #7395 from MikeMcQuaid/kill-jenkins
Remove last Jenkins references
2020-04-19 15:09:05 +01:00
Mike McQuaid
239b4c9d19
Remove last Jenkins references
- remove Jenkins Testing support from `brew pull`
- update reference to MacStadium Orka
- remove reference to DigitalOcean
2020-04-19 14:53:18 +01:00
Dawid Dziurla
8305919c93 pr-automerge: allow multiple comma separated -labels 2020-04-19 16:17:25 +10:00
Mike McQuaid
8eed72cd8b
Move file mode audit to RuboCop. 2020-04-18 15:44:24 +01:00
Mike McQuaid
8cb90595b3
dev-cmd/audit: add TODOs for RuboCop migrations. 2020-04-18 15:30:53 +01:00
Mike McQuaid
3546c39581
audit: remove trailing newline check.
This is already done by the default RuboCop configuration.
2020-04-18 15:30:53 +01:00
Mike McQuaid
5e2351cde6
dev-cmd/audit: add --skip-style option.
This will allow `brew style` and `brew audit` to be run separately
without providing duplicates.

Additionally, run RuboCop style rules when `--strict` isn't provided and
remove a confusing reference to `style`.
2020-04-16 08:24:38 +01:00
Alexander Bayandin
5088eff96b audit: add draft release detection 2020-04-15 15:04:10 +01:00
Mike McQuaid
85e65f6d9c
Move some cmd to dev-cmd.
None of these made sense as end-user commands.
2020-04-14 14:29:38 +01:00
Mike McQuaid
4fb649cad1
cmd, dev-cmd: use args.formulae_paths.
This makes these commands robust to invalid syntax.
2020-04-14 14:21:38 +01:00
vidusheeamoli
9cfef07682 dev-cmd/extract: instruct users to run git fetch unshallow 2020-04-14 18:07:41 +05:30
Jonathan Chang
951cf09d4b pr-pull: eliminate another curl call
We're setting the basename, so no need to make a curl call to figure out
what it ought to be. This should speed up bottle pulls even more.
2020-04-14 13:41:35 +10:00
Mike McQuaid
d52e870b07
rubocop: remove NewFormulaAudit.
This is no longer used anywhere.
2020-04-13 16:01:26 +01:00
Bo Anderson
a920f74671 dev-cmd/pr-pull: fix strategy error 2020-04-13 12:54:06 +01:00
Jonathan Chang
ac5ea023cf
Merge pull request #7344 from jonchang/pr-automerge
dev-cmd: add pr-automerge
2020-04-13 20:39:42 +10:00
Jonathan Chang
b2cf3bfe0f
Merge pull request #7343 from jonchang/pr-pull-jumbo-bottles
pr-pull: fix to fetch extra-large bottles
2020-04-13 20:29:17 +10:00
Jonathan Chang
5a95fe14aa dev-cmd: add pr-automerge
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-04-13 20:14:40 +10:00
Jonathan Chang
c1ba9975b8 pr-pull: fetch artifacts with no-resume strategy 2020-04-13 19:59:22 +10:00