1301 Commits
Author SHA1 Message Date
Jonathan Chang b99bfe1b8c Merge pull request #7717 from jonchang/preserve-trailers
pr-pull: preserve trailers when signing off commit
2020-06-10 21:15:56 +10:00
Jonathan Chang ee9c335b51 pr-pull: preserve trailers when signing off commit 2020-06-10 19:27:05 +10:00
Mike McQuaid 0dd004f53d dev-cmd/audit: handle nil newest_committed_revision.
Fixes #7712.
2020-06-10 08:39:41 +01:00
Mike McQuaid 2a94d382ac audit: make audit_revision_and_version_scheme faster.
This is really, really slow at the moment for a few reasons:
- it goes through the list of revisions twice
- it checks many more revisions than it needs to

Even after these improvements it's still by far the slowest audit so
am also making it a `--git` only audit.

Additionally, to further improve default `brew audit` performance do not
run `brew style` checks when doing `brew audit` with no arguments.

`brew style` can be run quickly and efficiently on all of a tap (and is
cached) so no need to duplicate it here.
2020-06-08 15:00:09 +01:00
Issy Long 8eba9b86ab Change occurrences of "blacklist" to "denylist" or "disallow"
- Depending on context, I've gone for either "denylist" or "disallow"
  here. "Disallow" for things in sentences, or actions, and "denylist"
  for list of things.
2020-06-06 22:38:33 +01:00
Issy Long 0041ea21f5 Change occurrences of "whitelist" to "allowlist" 2020-06-06 22:38:32 +01:00
Mike McQuaid 80c1a166b1 dev-cmd/pull: deprecate.
We no longer use this and `hub checkout` does what we want better.
2020-06-05 08:53:03 +01:00
Thierry Moisan 7a285cf476 Fix audit online release variable 2020-06-04 09:09:12 -04:00
Mike McQuaid 8b24d8c5e9 dev-cmd/audit: don't check GitHub releases without --online.
This both is more accurate and making `brew audit` without `--online` a
bit faster.
2020-06-03 17:50:57 +01:00
Mike McQuaid aa81982aba brew style --fix 2020-06-02 09:49:23 +01:00
Bo Anderson f6de06d244 dev-cmd/audit: whitelist python@3.8 to be non-keg-only 2020-05-31 22:39:29 +01:00
Mike McQuaid 9a654897d4 manpage: no longer mention installing from a URL.
This is deprecated in #7660.
2020-05-29 17:04:42 +01:00
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 4f75a77b08. 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 f90612ccf0 (#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 DziurlaandEric Knibbe 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 a7fdc7046f, reversing
changes made to bfa175d118.
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