[PATCH v2 0/2] Script to manage teams on the forge
Richard Earnshaw via Sourceware Forge <[email protected]>
| Newsgroups | gmane.comp.gcc.patches |
|---|---|
| Message-ID | <bmm.hlgff83408.gcc.gcc.rearnsha.211.2.0@forge-stage.sourceware.org> |
This patch is in two parts, but it's the second part that's the real code; the first just adds a few forge-Ids to the Maintainers.yml using a new field for the purposes of testing the script added in patch 2 and updates the maintainer_utils code to permit this new entry. The second patch adds a utility that will read the MAINTAINERS.yml file and then use the data in it to update the team memberships on the forge. I expect this to be the primary way of managing these teams going forward; it may even be possible to fully automate this so that the script runs automatically whenever a new version of MAINTAINERS.yml is pushed to trunk. The script takes two optional flags (in addition to the mandatory path to MAINTAINERS.yml): -v - verbose mode; causes information about what the script is doing to be printed on stdout -n - dry run mode; performs all actions except the final PUT and DELETE operations on the forge. Please feel free to add your forge account ID to the YAML data if I've missed you off, I know I haven't added everybody at this time, particularly for write-after accounts. --- This is a forge pull request published on the gcc-patches mailing list mailing list as requested by Richard Earnshaw via Sourceware Forge <[email protected]>. Forge discussion: https://forge.sourceware.org/gcc/gcc/pulls/211 Get it locally using: ``` git fetch forge-upstream "+refs/versioned_pull/211/*:refs/versioned_pull/211/*" git switch -c "pr-211-v2" "refs/versioned_pull/211/2/head" ``` Or, download the patch at: https://forge.sourceware.org/gcc/gcc/pulls/211.diff Created on: 2026-08-07 12:23:23+00:00 Latest update: 2026-08-18 10:46:09+00:00 Changes: 3 changed files, 479 additions, 6 deletions Head revision: rearnsha/gcc ref forge-teams commit 6422c972499c8012f281a52f1e3eb694a08d001a Base revision: gcc/gcc ref trunk commit 0ebadbad7c92133c467f7aed6f3c16a9e3b55774 r17-3357-g0ebadbad7c9213 Merge base: 0ebadbad7c92133c467f7aed6f3c16a9e3b55774 Requested Reviewers: rdfm Changed files: - A: contrib/forge_teams.py - M: MAINTAINERS.yml - M: contrib/maintainer_utils.py Richard Earnshaw (2): forge: Initial data for forge notifications forge: add a script to manage teams on the forge MAINTAINERS.yml | 54 ++++- contrib/forge_teams.py | 418 ++++++++++++++++++++++++++++++++++++ contrib/maintainer_utils.py | 13 ++ 3 files changed, 479 insertions(+), 6 deletions(-) create mode 100755 contrib/forge_teams.py Range-diff against v1: 1: e4e2aabaf9a29 ! 1: 226b07e35ccc5 forge: Initial data for forge notifications @@ MAINTAINERS.yml: users: - sn: Barany cn: Gergö Barany email: +@@ MAINTAINERS.yml: users: + - Reviewer: LTO + - WriteAfter + account: rguenth ++ forgeid: RichardBiener + inactive_email: + - [email protected] + - [email protected] +@@ MAINTAINERS.yml: users: + - Maintainer: libphobos + - WriteAfter + account: ibuclaw ++ forgeid: ibuclaw + inactive_email: + - [email protected] + - sn: Buettner @@ MAINTAINERS.yml: users: - Maintainer: vectorizer (+ tree-if-conv) - WriteAfter @@ MAINTAINERS.yml: users: - sn: Christopher cn: Eric Christopher email: +@@ MAINTAINERS.yml: users: + - Maintainer: libgrust + - WriteAfter + account: cohenarthur ++ forgeid: cohenarthur + - sn: Cohen + cn: William Cohen + email: @@ MAINTAINERS.yml: users: - Reviewer: aarch64 port - WriteAfter @@ MAINTAINERS.yml: users: - WriteAfter account: wilco + forgeid: Wilco + inactive_email: + - [email protected] - sn: Dimitrov - cn: Dimitar Dimitrov - email: +@@ MAINTAINERS.yml: users: + - Maintainer: c++ runtime libs special modes + - WriteAfter + account: fdumont ++ forgeid: fdumont + inactive_email: + - [email protected] + - sn: Dvorak @@ MAINTAINERS.yml: users: - Maintainer: arm port - WriteAfter account: rearnsha + forgeid: rearnsha - - sn: Eckhardt - cn: Jason Eckhardt - email: + inactive_email: + - [email protected] + - [email protected] +@@ MAINTAINERS.yml: users: + - Reviewer: libsanitizer, asan.cc + - WriteAfter + account: jakub ++ forgeid: jakub + inactive_email: + - [email protected] + - [email protected] @@ MAINTAINERS.yml: users: - Reviewer: arm port (MVE) - WriteAfter account: clyon + forgeid: clyon - - sn: Ma - cn: Jin Ma + inactive_email: + - [email protected] + - [email protected] +@@ MAINTAINERS.yml: users: + - Maintainer: static analyzer + - WriteAfter + account: dmalcolm ++ forgeid: dmalcolm + - sn: Malcomson + cn: Matthew Malcomson email: @@ MAINTAINERS.yml: users: - WriteAfter @@ MAINTAINERS.yml: users: - sn: Markianos-Wright cn: Stamatis Markianos-Wright email: +@@ MAINTAINERS.yml: users: + - Maintainer: dwarf debugging code + - WriteAfter + account: jason ++ forgeid: jason + inactive_email: + - [email protected] + - [email protected] +@@ MAINTAINERS.yml: users: + - Reviewer: driver + - WriteAfter + account: jsm28 ++ forgeid: jsm28 + inactive_email: + - [email protected] + - [email protected] @@ MAINTAINERS.yml: users: - DCO: [email protected] - DCO: [email protected] account: pinskia + forgeid: pinskia - - sn: Pitre - cn: Nicolas Pitre - email: + inactive_email: + - [email protected] + - [email protected] +@@ MAINTAINERS.yml: users: + - Reviewer: wide-int + - WriteAfter + account: rsandifo ++ forgeid: rsandifo + inactive_email: + - [email protected] + - [email protected] +@@ MAINTAINERS.yml: users: + - Maintainer: objective-c/c++ + - WriteAfter + account: iains ++ forgeid: iains + inactive_email: + - [email protected] + - [email protected] +@@ MAINTAINERS.yml: users: + - Maintainer: OpenACC + - WriteAfter: [email protected] + account: tschwinge ++ forgeid: tschwinge + inactive_email: + - [email protected] + - [email protected] @@ MAINTAINERS.yml: users: - WriteAfter - DCO: [email protected] account: ktkachov + forgeid: ktkachov + inactive_email: + - [email protected] - sn: Tobler - cn: Andreas Tobler - email: @@ MAINTAINERS.yml: users: - WriteAfter - DCO: [email protected] account: redi + forgeid: redi - - sn: Walfridsson - cn: Krister Walfridsson - email: + inactive_email: + - [email protected] + - [email protected] @@ MAINTAINERS.yml: subsystems: labels: [] - name: Algol 68 class: Lang - labels: [] + labels: -+ - Lang/algol68 ++ - Lang/algol68 + teams: -+ - Maintainers.Algol68 ++ - Maintainers.Algol68 - name: Android sub-port class: OS labels: [] @@ MAINTAINERS.yml: subsystems: class: CPU labels: [] + teams: -+ - Maintainers.AArch64 ++ - Maintainers.AArch64 - name: aarch64 port class: CPU - labels: [] + labels: -+ - Target/aarch64 ++ - Target/aarch64 + teams: -+ - Maintainers.AArch64 ++ - Maintainers.AArch64 - name: aix class: OS labels: [] @@ MAINTAINERS.yml: subsystems: class: CPU - labels: [] + labels: -+ - Target/arm ++ - Target/arm + teams: -+ - Maintainers.Arm ++ - Maintainers.Arm - name: arm port (MVE) - labels: [] + class: CPU + labels: -+ - Target/arm ++ - Target/arm + teams: -+ - Maintainers.Arm ++ - Maintainers.Arm - name: avr port class: CPU labels: [] @@ MAINTAINERS.yml: subsystems: class: Subsystem - labels: [] + labels: -+ - Library/libstdc++ ++ - Library/libstdc++ + teams: -+ - Maintainers.libstdcplusplus ++ - Maintainers.libstdcplusplus - name: c++ runtime libs special modes class: Subsystem labels: [] @@ MAINTAINERS.yml: subsystems: class: Subsystem - labels: [] + labels: -+ - Misc/forge ++ - Misc/forge + teams: -+ - Maintainers.forge ++ - Maintainers.forge - name: fp-bit class: Subsystem labels: [] 2: 67b15c272b494 ! 2: 6422c972499c8 forge: add a script to manage teams on the forge @@ contrib/forge_teams.py (new) + print(f" {m}") + print("\nDesired teams and members:") + for name, team in needed_teams.teams.items(): -+ print(name) ++ unmanaged = " (unmanaged)" if name in unmanaged_teams else "" ++ print(f"{name}{unmanaged}") + for m in team.members: + print(f" {m['forgeid']}") + return 0 if not error_count else 1 -- 2.54.0