120 Commits

Author SHA1 Message Date
Michka Popoff
1fc3d22ab4 pr-pull: allow to pull from multiple workflows
and allow to skip missing workflows

Can be used like this:
brew pr-pull --workflows=tests.yml,wheezy_tests.yml --ignore-missing-artifacts=wheezy_tests.yml PRNUMBER
2020-11-24 15:46:44 +01:00
Rylan Polster
e14ce96f22 pr-pull: skip bottles for CI-syntax-only PRs 2020-11-14 02:52:43 -05:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Jonathan Chang
500908ee6f rubocop: fix Lint/NoReturnInBeginEndBlocks 2020-11-10 23:28:31 +11:00
Jonathan Chang
4a5f1a8477 utils/github: paginate pull request commits API 2020-10-21 00:17:02 +11:00
William Ma
e9e63db825 search: Raise exception when no formulae/casks are found; Add --pull-request switch 2020-10-14 14:40:24 -04:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Jonathan Chang
6fb72f4d71 Deprecate GitHub basic authentication.
This API authentication path will be disabled on Nov 13 2020.
2020-10-01 17:18:11 +10:00
Jonathan Chang
415c36041a dev-cmd/pr-pull: use GitHub API to get PR commits 2020-09-20 13:21:27 +10:00
Dawid Dziurla
14741e3681
Merge pull request #8410 from dawidd6/github-releases
Support bottle uploads to GitHub Releases
2020-09-15 11:59:35 +02:00
Dawid Dziurla
f6601cee10
Support bottle uploads to GitHub Releases
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-09-12 13:03:39 +02:00
Mike McQuaid
fb4d08a49a Fix brew style 2020-09-11 10:29:22 +01:00
Seeker
51d167c122 utils/github: add create_bump_pr 2020-09-04 13:39:15 -07:00
Issy Long
c92ba20be3
utils/github: Fix 'uninitialized constant Utils::Shell'
- I tried `brew pr-publish` on Linux (as we don't have an auto-merge
  Action over there) and it failed with the following error:

```
Error: uninitialized constant Utils::Shell
Please report this issue:
  https://docs.brew.sh/Troubleshooting
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github.rb:69:in `initialize'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github.rb:278:in `exception'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github.rb:278:in `raise'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github.rb:278:in `raise_api_error'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github.rb:228:in `open_api'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github.rb:464:in `workflow_dispatch_event'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-publish.rb:43:in `block in pr_publish'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-publish.rb:33:in `each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-publish.rb:33:in `pr_publish'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'
```
2020-09-03 10:24:09 +01:00
Markus Reiter
ebd4ce467c Output GitHub Actions annotations for brew style. 2020-09-02 16:44:16 +02:00
Markus Reiter
6e6e01a71f Document GitHub. 2020-08-26 03:13:59 +02:00
Seeker
ffcf06867a Use rescue instead of yield 2020-08-18 23:06:42 -07:00
Seeker
d0c7c4fd71 utils/github: add forked_repo_info! 2020-08-18 23:06:42 -07:00
Seeker
671179d483 utils/github: add check_for_duplicate_pull_requests
Moved from dev-cmd/bump-formula-pr to utils/github
2020-08-11 19:26:03 -07:00
Dawid Dziurla
de4f25c13d
utils/github: add workflow_dispatch_event method 2020-07-09 12:50:09 +02:00
Jonathan Chang
b909fdd30f github: refactor GraphQL APIs 2020-07-05 15:31:29 +10:00
Jonathan Chang
d16e699ed7 github: need read-only email scope to see emails 2020-07-01 22:25:53 +10:00
Jonathan Chang
b57290b23f
Merge pull request #7844 from jonchang/signoff-approving-reviews
pr-pull: add commit message trailers for pull requests with approved reviews
2020-07-01 19:18:27 +10:00
lionellloh
57e7e7d60e small fix: res -> response 2020-06-30 23:23:19 +08:00
Lionell
fb4db63e3b Merge branch 'master' into license 2020-06-30 22:25:17 +08:00
Lionell Loh Jian An
5b3530b23d
Apply suggestions from code review
Code review changes

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-06-30 22:11:36 +08:00
Jonathan Chang
9cab9b7f39
pr-pull: handle empty string cases
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-06-29 18:55:47 +10:00
Jonathan Chang
90309e5f42 github: fetch approved reviews for a pull request 2020-06-29 12:53:03 +10:00
Dustin Rodrigues
f684a59fa5 bump-formula-pr: search for closed dupe PRs 2020-06-27 12:50:43 -04:00
Lionell Loh Jian An
eca528cccc
util github: remove nil as that is already expected behaviour
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-06-19 03:38:36 +08:00
Lionell
610dfe0fc2 audit: fixed with PR comments. Refactored get_repo_license api call and audit_license only new_formula 2020-06-18 00:44:33 +08:00
Sean Molenaar
a99d428f6d
Only search pull requests for artifacts 2020-05-28 15:14:32 +02:00
Mike McQuaid
4f75a77b08
Update deprecations
Add more deprecations, disable deprecations and remove disabled code.
2020-05-18 13:50:46 +01:00
Jonathan Chang
286488f753 github: add sponsors GraphQL API 2020-04-17 17:16:54 +10:00
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
Bo Anderson
a6d3e3c47c utils/github: form encode workflow branch 2020-04-13 21:22:01 +01:00
Jonathan Chang
c1ba9975b8 pr-pull: fetch artifacts with no-resume strategy 2020-04-13 19:59:22 +10:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Dawid Dziurla
e1ce5c852d
github: return output if JSON parsing is not desired 2020-04-01 13:23:54 +02:00
Jonathan Chang
39040fba8b utils/github: properly use token scopes 2020-03-31 22:11:06 +11:00
Jonathan Chang
5b1d0786a4 utils/github: add fetch_artifact API 2020-03-30 22:18:19 +11:00
Jonathan Chang
7c752e487f pr-publish: wording fixes 2020-03-24 12:31:58 +11:00
Jonathan Chang
4bb66c12e8 utils/github: add repository_dispatch API 2020-03-22 13:24:07 +11:00
Mike McQuaid
1e265247ca
rubocop: apply autofixes. 2020-03-13 21:16:18 +00:00
Mike McQuaid
8ad50cd4dc
utils/github: refactor and update logic.
- better handle `HOMEBREW_GITHUB_API_USERNAME` and
  `HOMEBREW_GITHUB_API_PASSWORD` from `brew gist-logs`
- only user personal access tokens from the macOS keychain (fixes #6862)
- general refactoring and cleanup around the above
2020-01-09 16:13:44 +00:00
Maxim Belkin
2735663dc3
GitHub Actions: get username if we don't have it 2019-11-25 16:43:29 -06: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
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
Markus Reiter
f099d44021 Add GitHub::create_check_run function. 2019-10-21 20:12:31 +02:00