From 909b8d078ef8dad2aa10d53b8669f4f1aa5720d5 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Mon, 29 May 2023 12:02:43 +0800 Subject: [PATCH 1/2] dev-cmd/update-maintainers: write JSON of maintainers This will be needed for Homebrew/homebrew-test-bot#933. --- .github/maintainers.json | 1 + .../workflows/sponsors-maintainers-man-completions.yml | 6 ++++-- Library/Homebrew/dev-cmd/update-maintainers.rb | 8 ++++++-- Library/Homebrew/startup/config.rb | 3 +++ 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 .github/maintainers.json diff --git a/.github/maintainers.json b/.github/maintainers.json new file mode 100644 index 0000000000..fe51488c70 --- /dev/null +++ b/.github/maintainers.json @@ -0,0 +1 @@ +[] diff --git a/.github/workflows/sponsors-maintainers-man-completions.yml b/.github/workflows/sponsors-maintainers-man-completions.yml index efa52ece07..a507a9f02a 100644 --- a/.github/workflows/sponsors-maintainers-man-completions.yml +++ b/.github/workflows/sponsors-maintainers-man-completions.yml @@ -66,7 +66,8 @@ jobs: git checkout "README.md" \ "docs/Manpage.md" \ "manpages/brew.1" \ - "completions" + "completions" \ + ".github/maintainers.json" else git checkout --no-track -B "${BRANCH}" origin/master fi @@ -83,7 +84,8 @@ jobs: then git add "README.md" \ "docs/Manpage.md" \ - "manpages/brew.1" + "manpages/brew.1" \ + ".github/maintainers.json" git commit -m "Update maintainers." \ -m "Autogenerated by the [sponsors-maintainers-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow." COMMITTED=true diff --git a/Library/Homebrew/dev-cmd/update-maintainers.rb b/Library/Homebrew/dev-cmd/update-maintainers.rb index dfac1f11ee..6df75822db 100644 --- a/Library/Homebrew/dev-cmd/update-maintainers.rb +++ b/Library/Homebrew/dev-cmd/update-maintainers.rb @@ -26,11 +26,15 @@ module Homebrew # We assume that only public members wish to be included in the README public_members = GitHub.public_member_usernames("Homebrew") + maintainers = GitHub.members_by_team("Homebrew", "maintainers") + + HOMEBREW_MAINTAINER_JSON.write(maintainers.keys.to_json) + maintainer_json_relative_path = HOMEBREW_MAINTAINER_JSON.relative_path_from(HOMEBREW_REPOSITORY).to_s members = { plc: GitHub.members_by_team("Homebrew", "plc"), tsc: GitHub.members_by_team("Homebrew", "tsc"), - maintainers: GitHub.members_by_team("Homebrew", "maintainers"), + maintainers: maintainers, } sentences = {} @@ -53,7 +57,7 @@ module Homebrew File.write(readme, content) diff = system_command "git", args: [ - "-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "README.md" + "-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "README.md", maintainer_json_relative_path ] if diff.status.success? ofail "No changes to list of maintainers." diff --git a/Library/Homebrew/startup/config.rb b/Library/Homebrew/startup/config.rb index 827d71388e..78161247f3 100644 --- a/Library/Homebrew/startup/config.rb +++ b/Library/Homebrew/startup/config.rb @@ -42,6 +42,9 @@ HOMEBREW_CACHE_FORMULA = (HOMEBREW_CACHE/"Formula").freeze # Where build, postinstall, and test logs of formulae are written to HOMEBREW_LOGS = Pathname(ENV.fetch("HOMEBREW_LOGS")).expand_path.freeze +# Path to the list of Homebrew maintainers as a JSON file +HOMEBREW_MAINTAINER_JSON = (HOMEBREW_REPOSITORY/".github/maintainers.json").freeze + # Must use `/tmp` instead of `TMPDIR` because long paths break Unix domain sockets HOMEBREW_TEMP = Pathname(ENV.fetch("HOMEBREW_TEMP")).then do |tmp| tmp.mkpath unless tmp.exist? From 782aa04e20c48d4a6533d74a7b53690e314911fb Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 29 May 2023 13:32:19 +0000 Subject: [PATCH 2/2] Update maintainers. Autogenerated by the [sponsors-maintainers-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow. --- .github/maintainers.json | 2 +- docs/Manpage.md | 2 ++ manpages/brew.1 | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/maintainers.json b/.github/maintainers.json index fe51488c70..3d5350936d 100644 --- a/.github/maintainers.json +++ b/.github/maintainers.json @@ -1 +1 @@ -[] +["Moisan","MikeMcQuaid","singingwolfboy","issyl0","dtrodrigues","dduugg","bayandin","Bo98","reitermarkus","SMillerDev","chenrui333","samford","fxcoudert","EricFromCanada","iMichka","alebcay","miccal","razvanazamfirei","danielnachun","dawidd6","branchvincent","gdams","cho-m","ZhongRuoyu","carlocab","Rylan12","nandahkrishna","bevanjkay","apainintheneck","p-linnane"] \ No newline at end of file diff --git a/docs/Manpage.md b/docs/Manpage.md index 181a72c715..48e91d86b9 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -1853,6 +1853,8 @@ This sanitized build environment ignores unrequested dependencies, which makes s `list` Mac App Store dependencies. * `--whalebrew`: `list` Whalebrew dependencies. +* `--vscode`: + `list` VSCode extensions. * `--describe`: `dump` adds a description comment above each line, unless the dependency does not have a description. * `--no-restart`: diff --git a/manpages/brew.1 b/manpages/brew.1 index 52079b4404..3039c141f1 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -2651,6 +2651,10 @@ Read the \fBBrewfile\fR from \fB~/\.Brewfile\fR\. \fBlist\fR Whalebrew dependencies\. . .TP +\fB\-\-vscode\fR +\fBlist\fR VSCode extensions\. +. +.TP \fB\-\-describe\fR \fBdump\fR adds a description comment above each line, unless the dependency does not have a description\. .