Merge pull request #15491 from Homebrew/maintainer-json

dev-cmd/update-maintainers: write JSON of maintainers
This commit is contained in:
Carlo Cabrera 2023-05-29 23:14:43 +08:00 committed by GitHub
commit a5bbdd23bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 4 deletions

1
.github/maintainers.json vendored Normal file
View File

@ -0,0 +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"]

View File

@ -66,7 +66,8 @@ jobs:
git checkout "README.md" \ git checkout "README.md" \
"docs/Manpage.md" \ "docs/Manpage.md" \
"manpages/brew.1" \ "manpages/brew.1" \
"completions" "completions" \
".github/maintainers.json"
else else
git checkout --no-track -B "${BRANCH}" origin/master git checkout --no-track -B "${BRANCH}" origin/master
fi fi
@ -83,7 +84,8 @@ jobs:
then then
git add "README.md" \ git add "README.md" \
"docs/Manpage.md" \ "docs/Manpage.md" \
"manpages/brew.1" "manpages/brew.1" \
".github/maintainers.json"
git commit -m "Update maintainers." \ 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." -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 COMMITTED=true

View File

@ -26,11 +26,15 @@ module Homebrew
# We assume that only public members wish to be included in the README # We assume that only public members wish to be included in the README
public_members = GitHub.public_member_usernames("Homebrew") 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 = { members = {
plc: GitHub.members_by_team("Homebrew", "plc"), plc: GitHub.members_by_team("Homebrew", "plc"),
tsc: GitHub.members_by_team("Homebrew", "tsc"), tsc: GitHub.members_by_team("Homebrew", "tsc"),
maintainers: GitHub.members_by_team("Homebrew", "maintainers"), maintainers: maintainers,
} }
sentences = {} sentences = {}
@ -53,7 +57,7 @@ module Homebrew
File.write(readme, content) File.write(readme, content)
diff = system_command "git", args: [ 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? if diff.status.success?
ofail "No changes to list of maintainers." ofail "No changes to list of maintainers."

View File

@ -42,6 +42,9 @@ HOMEBREW_CACHE_FORMULA = (HOMEBREW_CACHE/"Formula").freeze
# Where build, postinstall, and test logs of formulae are written to # Where build, postinstall, and test logs of formulae are written to
HOMEBREW_LOGS = Pathname(ENV.fetch("HOMEBREW_LOGS")).expand_path.freeze 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 # Must use `/tmp` instead of `TMPDIR` because long paths break Unix domain sockets
HOMEBREW_TEMP = Pathname(ENV.fetch("HOMEBREW_TEMP")).then do |tmp| HOMEBREW_TEMP = Pathname(ENV.fetch("HOMEBREW_TEMP")).then do |tmp|
tmp.mkpath unless tmp.exist? tmp.mkpath unless tmp.exist?

View File

@ -1853,6 +1853,8 @@ This sanitized build environment ignores unrequested dependencies, which makes s
`list` Mac App Store dependencies. `list` Mac App Store dependencies.
* `--whalebrew`: * `--whalebrew`:
`list` Whalebrew dependencies. `list` Whalebrew dependencies.
* `--vscode`:
`list` VSCode extensions.
* `--describe`: * `--describe`:
`dump` adds a description comment above each line, unless the dependency does not have a description. `dump` adds a description comment above each line, unless the dependency does not have a description.
* `--no-restart`: * `--no-restart`:

View File

@ -2651,6 +2651,10 @@ Read the \fBBrewfile\fR from \fB~/\.Brewfile\fR\.
\fBlist\fR Whalebrew dependencies\. \fBlist\fR Whalebrew dependencies\.
. .
.TP .TP
\fB\-\-vscode\fR
\fBlist\fR VSCode extensions\.
.
.TP
\fB\-\-describe\fR \fB\-\-describe\fR
\fBdump\fR adds a description comment above each line, unless the dependency does not have a description\. \fBdump\fR adds a description comment above each line, unless the dependency does not have a description\.
. .