From unknown Tue Jun 17 01:44:21 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78568] [PATCH 0/5] Synchronize team definitions with Codeberg Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 May 2025 19:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 78568 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78568@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17480300192842 (code B ref -1); Fri, 23 May 2025 19:54:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 May 2025 19:53:39 +0000 Received: from localhost ([127.0.0.1]:51019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uIYSY-0000jl-Sa for submit@debbugs.gnu.org; Fri, 23 May 2025 15:53:39 -0400 Received: from lists.gnu.org ([2001:470:142::17]:54178) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uIYSV-0000jI-HS for submit@debbugs.gnu.org; Fri, 23 May 2025 15:53:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uIYSM-0007rU-JH for guix-patches@gnu.org; Fri, 23 May 2025 15:53:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uIYSK-00046u-Om; Fri, 23 May 2025 15:53:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=RkIkMugLqwZzxkL/131Ip6OG3nt29z1d4PcLQo6G+OY=; b=BArRZIF/DDR8Gl y04ybsYpjx1/sy2Sr9+yhgLdxRvGxagUMaj2pLtf3EdWPYIcosUmjREr9kMTk+ugUzFQ1ZurThG3Q 9oODbY5RPvgdpfzGCV2+g2HmLJxiNeKaREB/hvdFR3n17CmfhJkoJf3HI82yUmnoqezqa+n87xOh6 5mhktzeaE1WBiMOkyPa8wLGdGdt42maSUcktH4kz29p0qV1q7va97o6B1Fs0/EsIxpGaaVDCYViFi Y/61oguDiR1HXxHKgvumAgX3jyI4725CNtdntq3pg8dj2leuOQ9fI/1zmB0dzRTmeZkrXdLtL5qJ8 WXd3pN1rTGMf++kT1blw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 23 May 2025 21:52:39 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Guix, As a followup to , this patch series adds a ‘sync-codeberg-teams’ command that pushes team definitions to Codeberg (name, description, and members). Currently it creates teams with read-only repository access such that being a team member does not equate to being a committer (as is currently the case). Synchronization works by deleting the team from Codeberg if it already exists, and recreating it. This is brute force but it appears to work well (nothing is lost and list of deletions/creations does not show up in the activity log; there’s also no rate limit apparently.) You can see the result here (you need to be logged in): https://codeberg.org/org/guix/teams That’s 42 teams. Coincidence? Feedback welcome! Ludo’. PS: ‘define-forgejo-request’ & co. could be used as the basis of a separate Guile library of Forgejo bindings. Ludovic Courtès (5): teams: Add ‘codeowners’ command in help message. teams: Use suitable team identifiers for Codeberg. teams: Add missing team descriptions. teams: Add Codeberg accounts to records. teams: Add ‘sync-codeberg-teams’ action. etc/teams.scm | 367 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 331 insertions(+), 36 deletions(-) base-commit: 8dff81313876a54519ce17e9fda64d4310e2dd5c -- 2.49.0 From unknown Tue Jun 17 01:44:21 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78568] [PATCH 1/5] teams: Add =?UTF-8?Q?=E2=80=98codeowners=E2=80=99?= command in help message. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 May 2025 19:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78568 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78568@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 78568-submit@debbugs.gnu.org id=B78568.17480301363642 (code B ref 78568); Fri, 23 May 2025 19:56:01 +0000 Received: (at 78568) by debbugs.gnu.org; 23 May 2025 19:55:36 +0000 Received: from localhost ([127.0.0.1]:51035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uIYUR-0000wd-QG for submit@debbugs.gnu.org; Fri, 23 May 2025 15:55:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38334) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uIYUQ-0000wG-6i for 78568@debbugs.gnu.org; Fri, 23 May 2025 15:55:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uIYUK-0004NQ-8m; Fri, 23 May 2025 15:55:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=G+pJjNUNEQmrKIbKxn6Gjx5mlQjzirRKNzlVmsxx0Mc=; b=lMm3kC66iRKHhrZ+qvs2 mA3wpddu0fKPHNlRwU5VnPNVJhD7DzDzSXXJcjALMjgz0pSmKQ6wHM3JqcGWSd7zAPTPiqvPtT6WR bE+GIA3yeIvQ1GLDtG5riSdSqcDJzZuBr+w4ik3O9hnm+0dDmwZJNYwRRAjZ2m0eCTzu9KhlPaniS UMZCYKph4Zssw408s+bqB3VPMIYpxEVjcTygahKRz/smQ4Vf0lFX7CEV9X+ptgOtW4PDKY7P9tV60 j7erXgfaXChYj99QMEXTTliXw5W1eYpqNZBPSuZTp//Lr0rpd+BaIKqQF8cE1gp5gSsY6lkNS53Ge nrr+oRt+9n6Atw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 23 May 2025 21:55:05 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * etc/teams.scm (main): Add ‘codeowners’ command in help message. Change-Id: I859997aba2b8829173e608e5ba1c8ab59b79d9c5 --- etc/teams.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/teams.scm b/etc/teams.scm index f7617e724e..a57d132787 100755 --- a/etc/teams.scm +++ b/etc/teams.scm @@ -1107,6 +1107,8 @@ (define (main . args) get-maintainer compatibility mode with Linux get_maintainer.pl show - display properties~%")))) + display properties + codeowners + write a 'CODEOWNERS' file suitable for Codeberg on standard output~%")))) (apply main (cdr (command-line))) -- 2.49.0 From unknown Tue Jun 17 01:44:21 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78568] [PATCH 2/5] teams: Use suitable team identifiers for Codeberg. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 May 2025 19:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78568 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78568@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 78568-submit@debbugs.gnu.org id=B78568.17480301403671 (code B ref 78568); Fri, 23 May 2025 19:56:02 +0000 Received: (at 78568) by debbugs.gnu.org; 23 May 2025 19:55:40 +0000 Received: from localhost ([127.0.0.1]:51041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uIYUW-0000x8-4q for submit@debbugs.gnu.org; Fri, 23 May 2025 15:55:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39546) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uIYUS-0000wJ-BQ for 78568@debbugs.gnu.org; Fri, 23 May 2025 15:55:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uIYUN-0004Oe-2m; Fri, 23 May 2025 15:55:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=5xHjdOdyw7ieKQ0HxBqonMLqJEFt0hONSsBz84NW5VU=; b=BoYYMn61N/ALPe28TFgw 3/yjwA+AeVElm6rKbRKuKVmHkIZauQFCIYg9+IA/MShzr8UOI0aJBTRPuJcAMVDIzH2820CQDtsb/ nkKxsnkZjbyjhhD7BqTmNUg8WlSiYDfHDisyl9gRr3e8itN+nUR3uP8Awu2mq2BpruJ4swkgj06iB ILSliH0VLPZGRUpwKWwGYwBPlgs9j6/mOdYlmAU7BE3r9T75QYNLlg+5+MtMoxcVaxi6oDdjHyBtU Vs/1qRc6jf13goHXqYjOZZOLEDrnWCOClP6Nz+vjbjgivqngtHu7W8UmMfSSoPhRFJocN9z9HAF9d rozAENA2x5Aceg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 23 May 2025 21:55:06 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) The “c++” team has to be called “cpp”. * etc/teams.scm (team-id->forgejo-id): New procedure. (team->codeowners-snippet): Use it. Change-Id: I10619d8833b5c747504f26b7b0eedb9d61bfd812 --- etc/teams.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/etc/teams.scm b/etc/teams.scm index a57d132787..9fa189a92c 100755 --- a/etc/teams.scm +++ b/etc/teams.scm @@ -1024,13 +1024,27 @@ (define (patch->teams patch-file) (find-team-by-scope (apply diff-revisions (git-patch->revisions patch-file))))) +(define (team-id->forgejo-id id) + "Return a name (string) suitable as a Forgejo team name." + (define valid ;"AlphaDashDot" + (char-set-union char-set:ascii (char-set #\-) (char-set #\.))) + + (define (valid? chr) + (char-set-contains? valid chr)) + + (string-map (match-lambda + (#\+ #\p) ;special case for "c++" + ((? valid? chr) chr) + (_ #\-)) + (symbol->string id))) + (define (team->codeowners-snippet team) (string-join (map (lambda (scope) (format #f "~50a @guix/~a" (if (regexp*? scope) (regexp*-pattern scope) (regexp-quote scope)) - (team-id team))) + (team-id->forgejo-id (team-id team)))) (team-scope team)) "\n" 'suffix)) -- 2.49.0 From unknown Tue Jun 17 01:44:21 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78568] [PATCH 3/5] teams: Add missing team descriptions. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 May 2025 19:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78568 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78568@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 78568-submit@debbugs.gnu.org id=B78568.17480301463697 (code B ref 78568); Fri, 23 May 2025 19:56:02 +0000 Received: (at 78568) by debbugs.gnu.org; 23 May 2025 19:55:46 +0000 Received: from localhost ([127.0.0.1]:51047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uIYUb-0000xY-Jm for submit@debbugs.gnu.org; Fri, 23 May 2025 15:55:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39560) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uIYUU-0000wM-HP for 78568@debbugs.gnu.org; Fri, 23 May 2025 15:55:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uIYUP-0004Q8-6K; Fri, 23 May 2025 15:55:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=rKnx0NJv/UpoE5uY3IxFr5SxpSO6RCBDVv0nrTvIcYM=; b=LG0+m2O4DdpQ0ZvEQDrw 0Fb+xbpl+o19Agp2x+GBEuiz5sRImJkNeY/gyAufkirgcUmfTyy9Qtw/E4wMrfgu9h7pr5aQ6QzYd qGn6JJzmgocWQelpL6s8M9NCSOxKtvT03zYQNFUqz1tCmeUOFqRaEnRKiLKsh4Ddp0mmdVEzfMA1V AmrPHh/FWW3Gzo/vSrVfAzry7tTAi1dLHumcKYcl/HOMFG8LOKVfsZ8wbXgjl7gaB/60swf9FHJLR 3hOBaEFmjNGti27gDzNHdmM6eZ6jneD+weRmJ3YA50hQELYTqgI9fQuwjTJTSQUKbQebi456tZP2I SfIJW4X6ZlPFyA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 23 May 2025 21:55:07 +0200 Message-ID: <64771be5798f10c2f7913ef23c9a14acd46d9c2d.1748029404.git.ludo@gnu.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * etc/teams.scm (bootstrap, hurd): Add #:description. Change-Id: I531907763c746420a60daf6a5c33ec586565db07 --- etc/teams.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/teams.scm b/etc/teams.scm index 9fa189a92c..4b06d3a937 100755 --- a/etc/teams.scm +++ b/etc/teams.scm @@ -126,6 +126,7 @@ (define-team audio (define-team bootstrap (team 'bootstrap #:name "Bootstrap" + #:description "Full-source bootstrap: stage0, Mes, Gash, etc." #:scope (list "gnu/packages/commencement.scm" "gnu/packages/mes.scm"))) @@ -355,6 +356,7 @@ (define-team home (define-team hurd (team 'hurd #:name "Team for the Hurd" + #:description "GNU Hurd packages and operating system support." #:scope (list "gnu/system/hurd.scm" "gnu/system/images/hurd.scm" "gnu/build/hurd-boot.scm" -- 2.49.0 From unknown Tue Jun 17 01:44:21 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78568] [PATCH 5/5] teams: Add =?UTF-8?Q?=E2=80=98sync-codeberg-teams=E2=80=99?= action. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 May 2025 19:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78568 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78568@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 78568-submit@debbugs.gnu.org id=B78568.17480301473705 (code B ref 78568); Fri, 23 May 2025 19:56:03 +0000 Received: (at 78568) by debbugs.gnu.org; 23 May 2025 19:55:47 +0000 Received: from localhost ([127.0.0.1]:51049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uIYUc-0000xf-3M for submit@debbugs.gnu.org; Fri, 23 May 2025 15:55:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39580) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uIYUW-0000wf-W1 for 78568@debbugs.gnu.org; Fri, 23 May 2025 15:55:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uIYUR-0004QQ-GJ; Fri, 23 May 2025 15:55:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=NF17NZo+6lgD6OjXe5QFwjqQkMTETXWivWhzlDaiB3Y=; b=gEEIQX6vQhlq8J6eies6 jkVpcqmhHxaAWUyz2tjvWUSL1p37o9lioSiiesKLAonCtoXLtkDFSfXXhGVaILvbqCsXHPwIo0u3x Zv3jM8s+1jUqcxkvmkJ8Ij76I/K/eE6QSL4kjr9bq0w6v70+pJOV6xXpQgQjdCoKbWvlL8sow809v gEgEBSJNNXGkmHpADL+hoBGG2XBKZNQWGznDN1I4BIF7iapq0RalLIoUpHPYPZ39EIWjk0fD9VFeX sxwgUr8qiar0HEqaa0Yo79vzOX1wH+uBNaxggT26VlQbsnS7kpZ2zWrERGUkN6QNkOpvOi0afpILa XHBsEfzc+YocgA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 23 May 2025 21:55:09 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * etc/teams.scm (): New JSON mapping. (unit-map->json, json->unit-map): New procedures. (%default-forgejo-team-units, %default-forgejo-team-unit-map) (%codeberg-organization): New variables. (codeberg-url, forgejo-http-headers): New procedures. (&forgejo-error): New record type. (process-url-components, define-forgejo-request): New macros. (organization-teams, create-team, add-team-member) (team->forgejo-team, synchronize-team, synchronize-teams): New procedures. (main): Add ‘sync-codeberg-teams’ action. Change-Id: I6b1f437a3407bc2d44965519990deb524afa9528 --- etc/teams.scm | 252 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 250 insertions(+), 2 deletions(-) diff --git a/etc/teams.scm b/etc/teams.scm index e881e916ab..08ca891e0d 100755 --- a/etc/teams.scm +++ b/etc/teams.scm @@ -41,12 +41,21 @@ (use-modules (srfi srfi-1) (srfi srfi-9) (srfi srfi-26) + (srfi srfi-34) + (srfi srfi-35) + (srfi srfi-71) (ice-9 format) (ice-9 regex) (ice-9 match) (ice-9 rdelim) (guix ui) - (git)) + (git) + (json) + (web client) + (web request) + (web response) + (rnrs bytevectors) + (guix base64)) (define-record-type (%make-regexp* pat flag rx) @@ -116,6 +125,241 @@ (define-syntax-rule (define-member person teams ...) team (cons p (team-members team))))) (quote (teams ...))))) + +;;; +;;; Forgejo support. +;;; + +;; Forgejo team. This corresponds to both the 'Team' and 'CreateTeamOption' +;; structures in Forgejo. +(define-json-mapping + forgejo-team forgejo-team? + json->forgejo-team <=> forgejo-team->json + (name forgejo-team-name) + (id forgejo-team-id) ;integer + (description forgejo-team-description) + (all-repositories? forgejo-team-all-repositories? + "includes_all_repositories") + (can-create-org-repository? forgejo-team-can-create-org-repository? + "can_create_org_repo") + (permission forgejo-team-permission + "permission" string->symbol symbol->string) + ;; A 'units' field exists but is deprecated in favor of 'units_map'. + (unit-map forgejo-team-unit-map + "units_map" json->unit-map unit-map->json)) + +(define (unit-map->json lst) + (map (match-lambda + ((unit . permission) + (cons unit (symbol->string permission)))) + lst)) + +(define (json->unit-map lst) + (map (match-lambda + ((unit . permission) + (cons unit (string->symbol permission)))) + lst)) + +(define %default-forgejo-team-units + '("repo.code" "repo.issues" "repo.pulls" "repo.releases" + "repo.wiki" "repo.ext_wiki" "repo.ext_issues" "repo.projects" + "repo.packages" "repo.actions")) + +(define %default-forgejo-team-unit-map + ;; Everything (including "repo.code") is read-only by default, except a few + ;; units. + (map (match-lambda + ("repo.pulls" (cons "repo.pulls" 'write)) + ("repo.issues" (cons "repo.issues" 'write)) + ("repo.wiki" (cons "repo.wiki" 'write)) + (unit (cons unit 'read))) + %default-forgejo-team-units)) + +(define (forgejo-http-headers token) + "Return the HTTP headers for basic authorization with TOKEN." + `((content-type . (application/json (charset . "UTF-8"))) + ;; The "Auth Basic" scheme needs a base64-encoded colon-separated user and + ;; token values. Forgejo doesn't seem to care for the user part but the + ;; colon seems to be necessary for the token value to get extracted. + (authorization . (basic . ,(base64-encode + (string->utf8 + (string-append ":" token))))))) + +;; Error with a Forgejo request. +(define-condition-type &forgejo-error &error + forgejo-error? + (url forgejo-error-url) + (method forgejo-error-method) + (response forgejo-error-response)) + +(define %codeberg-organization + ;; Name of the organization at codeberg.org. + "guix") + +(define* (codeberg-url items #:key (parameters '())) + "Construct a Codeberg API URL with the path components ITEMS and query +PARAMETERS." + (define query + (match parameters + (() "") + (((keys . values) ...) + (string-append "?" (string-join + (map (lambda (key value) + (string-append key "=" value)) ;XXX: hackish + keys values) + "&"))))) + + (string-append "https://codeberg.org/api/v1/" + (string-join items "/") + query)) + +(define-syntax process-url-components + (syntax-rules (&) + "Helper macro to construct a Codeberg URL." + ((_ components ... & parameters) + (codeberg-url (list components ...) + #:parameters parameters)) + ((_ components ...) + (codeberg-url (list components ...))))) + +(define-syntax define-forgejo-request + (syntax-rules (=>) + "Define a procedure that performs a Forgejo request." + ((_ (proc parameters ...) + docstring + (verb components ...) + body + => code + deserialize) + (define (proc token parameters ...) + docstring + (let* ((url (process-url-components components ...)) + (response port (http-request url + #:method 'verb + #:streaming? #t + #:headers (forgejo-http-headers token) + #:body body))) + (if (= code (response-code response)) + (let ((value (deserialize port))) + (when port (close-port port)) + value) + (begin + (when port (close-port port)) + (raise (condition (&forgejo-error (url url) + (method 'verb) + (response response))))))))) + ((_ (proc parameters ...) + docstring + (method components ...) + => code + deserialize) + (define-forgejo-request (proc parameters ...) + docstring + (method components ...) + "" + => code + deserialize)) + ((_ (proc parameters ...) + docstring + (method components ...) + => code) + (define-forgejo-request (proc parameters ...) + docstring + (method components ...) + "" + => code + (const *unspecified*))))) + +;; API documentation at . + +(define-forgejo-request (organization-teams organization) + "Return the list of teams of ORGANIZATION." + (GET "orgs" organization "teams" + & '(("limit" . "100"))) ;get up to 100 teams + => 200 + (lambda (port) + (map json->forgejo-team (vector->list (json->scm port))))) + +(define-forgejo-request (create-team organization team) + "Create TEAM, a Forgejo team, under ORGANIZATION." + (POST "orgs" organization "teams") + (forgejo-team->json team) + => 201 + json->forgejo-team) + +(define-forgejo-request (delete-team team) + "Delete TEAM, a Forgejo team." + (DELETE "teams" (number->string (forgejo-team-id team))) + => 204) + +(define-forgejo-request (add-team-member team user) + "Add USER (a string) to TEAM, a Forgejo team." + (PUT "teams" (number->string (forgejo-team-id team)) + "members" user) + => 204) + +(define (team->forgejo-team team) + "Return a Forgejo team derived from TEAM, a record." + (forgejo-team (team-id->forgejo-id (team-id team)) + #f + (or (team-description team) "") + #f ;all-repositories? + #f ;can-create-org-repository? + 'read ;permission + %default-forgejo-team-unit-map)) + +(define* (synchronize-team token team + #:key + (current-teams + (organization-teams token + %codeberg-organization)) + (log-port (current-error-port))) + "Synchronize TEAM, a record, so that its metadata and list of members +are accurate on Codeberg. Lookup team IDs among CURRENT-TEAMS." + (let ((forgejo-team + (find (let ((name (team-id->forgejo-id (team-id team)))) + (lambda (candidate) + (string=? (forgejo-team-name candidate) name))) + current-teams))) + (when forgejo-team + ;; Delete the previously-created team. + (format log-port "team '~a' already exists; deleting it~%" + (forgejo-team-name forgejo-team)) + (delete-team token forgejo-team)) + + ;; Create the team. + (let ((forgejo-team + (create-team token %codeberg-organization + (or forgejo-team + (team->forgejo-team team))))) + (format log-port "created team '~a'~%" + (forgejo-team-name forgejo-team)) + (let ((members (filter-map person-codeberg-account + (team-members team)))) + (for-each (lambda (member) + (add-team-member token forgejo-team member)) + members) + (format log-port "added ~a members to team '~a'~%" + (length members) + (forgejo-team-name forgejo-team)) + forgejo-team)))) + +(define (synchronize-teams token) + "Push all the existing teams on Codeberg." + (let ((teams (sort-teams + (hash-map->list (lambda (_ value) value) %teams)))) + (format (current-error-port) + "creating ~a teams in the '~a' organization at Codeberg...~%" + (length teams) %codeberg-organization) + + ;; Arrange to compute the list of existing teams once and for all. + (for-each (let ((teams (organization-teams token + %codeberg-organization))) + (lambda (team) + (synchronize-team token team + #:current-teams teams))) + teams))) + (define-team audio @@ -1132,6 +1376,8 @@ (define (main . args) (list-teams team-names)) (("codeowners") (export-codeowners (current-output-port))) + (("sync-codeberg-teams" token) + (synchronize-teams token)) (anything (format (current-error-port) "Usage: etc/teams.scm [] @@ -1154,6 +1400,8 @@ (define (main . args) show display properties codeowners - write a 'CODEOWNERS' file suitable for Codeberg on standard output~%")))) + write a 'CODEOWNERS' file suitable for Codeberg on standard output + sync-codeberg-teams + create or update the list of teams at Codeberg~%")))) (apply main (cdr (command-line))) -- 2.49.0 From unknown Tue Jun 17 01:44:21 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78568] [PATCH 4/5] teams: Add Codeberg accounts to records. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 May 2025 19:56:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78568 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78568@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 78568-submit@debbugs.gnu.org id=B78568.17480301573739 (code B ref 78568); Fri, 23 May 2025 19:56:04 +0000 Received: (at 78568) by debbugs.gnu.org; 23 May 2025 19:55:57 +0000 Received: from localhost ([127.0.0.1]:51051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uIYUc-0000xi-Tr for submit@debbugs.gnu.org; Fri, 23 May 2025 15:55:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39570) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uIYUW-0000wc-AF for 78568@debbugs.gnu.org; Fri, 23 May 2025 15:55:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uIYUQ-0004QI-JL; Fri, 23 May 2025 15:55:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=Rx3LKXsW6VOrl27Ks5Ldn6svIVbVSkKiD+IPiETzgZs=; b=UjYufHE3HDiD1jQfebSu YxbyIyjfhlu5rxYxdhQaO8NVZB1UiGd8i4MddzLxJAauzcRW938nWUnsrKsB4cwI3O04yX04CzLlk vUQn2nSfCF7JkYaN7Am3XUB8C0hQIhlMGajYY2eEN00DLe4R1mawrkOuGkqOay36iLv+hq6oG8zOt GtUNR2pxvk0c9xUNoHquVNOd0AmGquWPxdVvVR3IbBIOKwhnOOPCZWKnU8Zlv0SHhIm5l5hDf0iUh Xz25MaPuMUL4tsRNUd395AnnLtcpphC7lDcIDwe0rr/y3N1BOg/8Obrf4/PUpp4w9aIpSKKpVCOVN YytMmFAdrQaH9Q==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 23 May 2025 21:55:08 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Based on the committer accounts given in the thread at . * etc/teams.scm ()[account]: Add field. (person): Add ‘account’ parameter. : Add known Codeberg account names. Change-Id: Iad3b10c328b0df5d3c68d98ffee7f7c8ec4c8e23 --- etc/teams.scm | 95 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 33 deletions(-) diff --git a/etc/teams.scm b/etc/teams.scm index 4b06d3a937..e881e916ab 100755 --- a/etc/teams.scm +++ b/etc/teams.scm @@ -75,13 +75,14 @@ (define-record-type (scope team-scope)) (define-record-type - (make-person name email) + (make-person name email account) person? (name person-name) - (email person-email)) + (email person-email) + (account person-codeberg-account)) -(define* (person name #:optional email) - (make-person name email)) +(define* (person name #:optional email account) + (make-person name email account)) (define* (team id #:key name description (members '()) (scope '())) @@ -672,24 +673,29 @@ (define-team zig (define-member (person "Eric Bavier" - "bavier@posteo.net") + "bavier@posteo.net" + "bavier") science) (define-member (person "Lars-Dominik Braun" - "lars@6xq.net") + "lars@6xq.net" + "ldb") python haskell) (define-member (person "Jonathan Brielmaier" - "jonathan.brielmaier@web.de") + "jonathan.brielmaier@web.de" + "jonsger") mozilla) (define-member (person "Ludovic Courtès" - "ludo@gnu.org") + "ludo@gnu.org" + "civodul") core home bootstrap core-packages installer documentation mentors) (define-member (person "Andreas Enge" - "andreas@enge.fr") + "andreas@enge.fr" + "enge") bootstrap core-packages lxqt science tex) (define-member (person "Tanguy Le Carrour" @@ -701,15 +707,18 @@ (define-member (person "Tobias Geerinckx-Rice" core mentors) (define-member (person "Steve George" - "steve@futurile.net") + "steve@futurile.net" + "futurile") rust) (define-member (person "Leo Famulari" - "leo@famulari.name") + "leo@famulari.name" + "lfam") kernel) (define-member (person "Efraim Flashner" - "efraim@flashner.co.il") + "efraim@flashner.co.il" + "efraim") embedded bootstrap rust) (define-member (person "jgart" @@ -717,11 +726,13 @@ (define-member (person "jgart" lisp mentors) (define-member (person "Guillaume Le Vaillant" - "glv@posteo.net") + "glv@posteo.net" + "glv") lisp) (define-member (person "Julien Lepiller" - "julien@lepiller.eu") + "julien@lepiller.eu" + "roptat") java ocaml translations) (define-member (person "Philip McGrath" @@ -729,23 +740,28 @@ (define-member (person "Philip McGrath" racket) (define-member (person "Mathieu Othacehe" - "othacehe@gnu.org") + "othacehe@gnu.org" + "mothacehe") core installer mentors) (define-member (person "Florian Pelz" - "pelzflorian@pelzflorian.de") + "pelzflorian@pelzflorian.de" + "pelzflorian") translations) (define-member (person "Liliana Marie Prikler" - "liliana.prikler@gmail.com") + "liliana.prikler@gmail.com" + "lilyp") emacs games gnome) (define-member (person "Ricardo Wurmus" - "rekado@elephly.net") + "rekado@elephly.net" + "rekado") r sugar) (define-member (person "Christopher Baines" - "guix@cbaines.net") + "guix@cbaines.net" + "cbaines") core mentors ruby) (define-member (person "Andrew Tropin" @@ -769,19 +785,22 @@ (define-member (person "Simon Tournier" julia core mentors r) (define-member (person "宋文武" - "iyzsong@envs.net") + "iyzsong@envs.net" + "iyzsong") games localization lxqt qt xfce) (define-member (person "Vagrant Cascadian" - "vagrant@debian.org") + "vagrant@debian.org" + "vagrantc") embedded) -(define-member (person "Vagrant Cascadian" +(define-member (person "Vagrant Cascadian" ;XXX: duplicate "vagrant@reproducible-builds.org") reproduciblebuilds) (define-member (person "Maxim Cournoyer" - "maxim.cournoyer@gmail.com") + "maxim.cournoyer@gmail.com" + "apteryx") documentation gnome qt telephony electronics) (define-member (person "Katherine Cox-Buday" @@ -797,7 +816,8 @@ (define-member (person "Gabriel Wicki" audio documentation electronics embedded) (define-member (person "Ekaitz Zarraga" - "ekaitz@elenq.tech") + "ekaitz@elenq.tech" + "ekaitz-zarraga") bootstrap zig electronics) (define-member (person "Divya Ranjan Pattanaik" @@ -805,7 +825,8 @@ (define-member (person "Divya Ranjan Pattanaik" emacs rust haskell) (define-member (person "Clément Lassieur" - "clement@lassieur.org") + "clement@lassieur.org" + "snape") mozilla) (define-member (person "Sharlatan Hellseher" @@ -817,7 +838,8 @@ (define-member (person "Vivien Kraus" gnome) (define-member (person "Mark H Weaver" - "mhw@netris.org") + "mhw@netris.org" + "mhw") mozilla) (define-member (person "Adam Faiz" @@ -829,7 +851,8 @@ (define-member (person "Laurent Gatto" r) (define-member (person "Nicolas Goaziou" - "guix@nicolasgoaziou.fr") + "guix@nicolasgoaziou.fr" + "ngz") tex) (define-member (person "André Batista" @@ -837,15 +860,18 @@ (define-member (person "André Batista" mozilla) (define-member (person "Janneke Nieuwenhuizen" - "janneke@gnu.org") + "janneke@gnu.org" + "janneke") bootstrap core-packages home hurd installer) (define-member (person "Ian Eure" - "ian@retrospec.tv") + "ian@retrospec.tv" + "ieure") mozilla emacs) (define-member (person "Zheng Junjie" - "z572@z572.online") + "z572@z572.online" + "z572") core-packages qt kde) (define-member (person "Sughosha" @@ -853,7 +879,8 @@ (define-member (person "Sughosha" kde) (define-member (person "Jelle Licht" - "jlicht@fsfe.org") + "jlicht@fsfe.org" + "jlicht") javascript) (define-member (person "Cayetano Santos" @@ -861,11 +888,13 @@ (define-member (person "Cayetano Santos" emacs electronics) (define-member (person "Greg Hogan" - "code@greghogan.com") + "code@greghogan.com" + "greghogan") c++) (define-member (person "Hilton Chain" - "hako@ultrarare.space") + "hako@ultrarare.space" + "hako") emacs home localization mozilla rust zig) (define-member (person "Noé Lopez" -- 2.49.0 From unknown Tue Jun 17 01:44:21 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78568] [PATCH 5/5] teams: Add =?UTF-8?Q?=E2=80=98sync-codeberg-teams=E2=80=99?= action. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 27 May 2025 08:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78568 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 78568@debbugs.gnu.org Received: via spool by 78568-submit@debbugs.gnu.org id=B78568.174833476027925 (code B ref 78568); Tue, 27 May 2025 08:33:01 +0000 Received: (at 78568) by debbugs.gnu.org; 27 May 2025 08:32:40 +0000 Received: from localhost ([127.0.0.1]:37892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uJpjj-0007GK-WE for submit@debbugs.gnu.org; Tue, 27 May 2025 04:32:40 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:58555) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uJpjg-0007FX-3O for 78568@debbugs.gnu.org; Tue, 27 May 2025 04:32:37 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-74264d1832eso3325964b3a.0 for <78568@debbugs.gnu.org>; Tue, 27 May 2025 01:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748334749; x=1748939549; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tonfMMrz1M7yBwSBfu83XeUkDqQaX85vk9iCMrTL8uA=; b=dGXgvHQvBhs/6OOocfsl6DX8vLatKFux7NP+5d54VK0wgiYQA5SrNNPCec6yWY/yW9 ts+fHL1mlW8jxMmb6MLJviI0brH7B8I5shnpYRU5SrSDFkNkU/7o+J4HTHGOTZxgdF38 oOr/phPY2lx7dl2Rh5wweqF4kx5OxxiXxzqxCNJaQy+hTI3JUzm2YVF1+mPa8zjevvbG i7W1j4rZs4BYrwrBn17b9fkpy9Y22S8o2OvDoTXdzYpquQoGjrsHrEhIeyznlQNows9P wLFAmR8kXpkG44Dn7hxXCzCLDwLzhlblDoSCWO1AZCVxOH7pc6msuoi00zwsxiGfJUq9 Hidw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748334749; x=1748939549; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tonfMMrz1M7yBwSBfu83XeUkDqQaX85vk9iCMrTL8uA=; b=NE0xOij7ncXOOCrxwuZc5Sqn2iC5SGE5wLiZ2uJszuqyRKWQ6kfixKmzm7rgAQU9Kc eqaBvDP0EnV1oAlreyjs10YK7Ec0IJqkzjiZC2CxeAII9iCuyzx6ZVq7qzVg53y9g2Pg Yuur3q5cMR6P0zBJ3abujCLST1a1BVtTm5Uv0p5ftSSExkCTIOrgvlBsXfDK+V3mFXm8 AmlF0AVaEd14irPR8KBEEnJhk7iWHhpLwtr4Js+wuvkKHAbki1VVNeT4GyUOlNvqSPHi 6lBuKhJRwaDbdIZ4TTYbbEb4lvSujQxW0vCbX0H1RjupNFqu8rFHK4jazrzbKlmQuvNC 6Lkg== X-Gm-Message-State: AOJu0YxmB4BPVJbz1wrawttNJDLKy0MIme/XmbWqTDOkT2TnoghP1Sg1 R7pYNWNHyqFtDtvNvPJ6hooXhpLBgTCoFn2BaDCcwLqRsdXIldyEf6UZvRz0JKYK X-Gm-Gg: ASbGncuPiJeJ09DoVPvjZlAyfnnf11AK6rsmF4jfm7qKFkLca+Pp2VAnTxwAiRBcB8X YtSP1G9FuRB+Poa/aGj7dWU0c2Qnnj7UOttv/z08rqv74R9eCNeujJIcY/dIZpJh/VxMcgX8wUB h4O+iKk83MoBWWais1tMj9Ba/ZXFmMnR0LDxVazmldFR95097GZShDzIi4sOVGHdkV6jWbm4Uum oFT4xXH6X68XNsBlX/r1deIsZPUzO5QbY2rCxS+oze02ss/L71pAZIcNOKuG9hd57KrlUysjuS/ GtQVHhtyeCSyh7uXmxBMHp9AqN8XbVFzA0JhYqfS3IJguHZ99w== X-Google-Smtp-Source: AGHT+IGQp4gnd5InoPbDHfbwYZArhln3WTDuFPdFZpztfGha2SCk5scH3rdLnmH18lPv+qg9SFCNTA== X-Received: by 2002:a05:6a00:2443:b0:742:b3a6:db16 with SMTP id d2e1a72fcca58-745fe058d5amr18244616b3a.20.1748334748773; Tue, 27 May 2025 01:32:28 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74629861713sm642674b3a.146.2025.05.27.01.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 May 2025 01:32:28 -0700 (PDT) From: Maxim Cournoyer In-Reply-To: ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Fri, 23 May 2025 21:55:09 +0200") References: Date: Tue, 27 May 2025 17:32:26 +0900 Message-ID: <87cybufo85.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Ludovic Court=C3=A8s writes: > * etc/teams.scm (): New JSON mapping. > (unit-map->json, json->unit-map): New procedures. > (%default-forgejo-team-units, %default-forgejo-team-unit-map) > (%codeberg-organization): New variables. > (codeberg-url, forgejo-http-headers): New procedures. > (&forgejo-error): New record type. > (process-url-components, define-forgejo-request): New macros. > (organization-teams, create-team, add-team-member) > (team->forgejo-team, synchronize-team, synchronize-teams): New > procedures. > (main): Add =E2=80=98sync-codeberg-teams=E2=80=99 action. That's a sizable amount of code! Maybe we should embark on a guile-codeberg project at some point to have a library for interacting with its API. > Change-Id: I6b1f437a3407bc2d44965519990deb524afa9528 > --- > etc/teams.scm | 252 +++++++++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 250 insertions(+), 2 deletions(-) > > diff --git a/etc/teams.scm b/etc/teams.scm > index e881e916ab..08ca891e0d 100755 > --- a/etc/teams.scm > +++ b/etc/teams.scm > @@ -41,12 +41,21 @@ > (use-modules (srfi srfi-1) > (srfi srfi-9) > (srfi srfi-26) > + (srfi srfi-34) > + (srfi srfi-35) > + (srfi srfi-71) > (ice-9 format) > (ice-9 regex) > (ice-9 match) > (ice-9 rdelim) > (guix ui) > - (git)) > + (git) > + (json) > + (web client) > + (web request) > + (web response) > + (rnrs bytevectors) > + (guix base64)) >=20=20 > (define-record-type > (%make-regexp* pat flag rx) > @@ -116,6 +125,241 @@ (define-syntax-rule (define-member person teams ...) > team (cons p (team-members team))))) > (quote (teams ...))))) >=20=20 > + > +;;; > +;;; Forgejo support. > +;;; > + > +;; Forgejo team. This corresponds to both the 'Team' and 'CreateTeamOpt= ion' > +;; structures in Forgejo. > +(define-json-mapping > + forgejo-team forgejo-team? > + json->forgejo-team <=3D> forgejo-team->json > + (name forgejo-team-name) > + (id forgejo-team-id) ;integer > + (description forgejo-team-description) > + (all-repositories? forgejo-team-all-repositories? > + "includes_all_repositories") > + (can-create-org-repository? forgejo-team-can-create-org-repository? > + "can_create_org_repo") > + (permission forgejo-team-permission > + "permission" string->symbol symbol->string) > + ;; A 'units' field exists but is deprecated in favor of 'units_map'. > + (unit-map forgejo-team-unit-map > + "units_map" json->unit-map unit-map->json)) > + > +(define (unit-map->json lst) > + (map (match-lambda > + ((unit . permission) > + (cons unit (symbol->string permission)))) > + lst)) > + > +(define (json->unit-map lst) > + (map (match-lambda > + ((unit . permission) > + (cons unit (string->symbol permission)))) > + lst)) > + > +(define %default-forgejo-team-units > + '("repo.code" "repo.issues" "repo.pulls" "repo.releases" > + "repo.wiki" "repo.ext_wiki" "repo.ext_issues" "repo.projects" > + "repo.packages" "repo.actions")) > + > +(define %default-forgejo-team-unit-map > + ;; Everything (including "repo.code") is read-only by default, except = a few > + ;; units. > + (map (match-lambda > + ("repo.pulls" (cons "repo.pulls" 'write)) > + ("repo.issues" (cons "repo.issues" 'write)) > + ("repo.wiki" (cons "repo.wiki" 'write)) > + (unit (cons unit 'read))) > + %default-forgejo-team-units)) > > +(define (forgejo-http-headers token) > + "Return the HTTP headers for basic authorization with TOKEN." > + `((content-type . (application/json (charset . "UTF-8"))) > + ;; The "Auth Basic" scheme needs a base64-encoded colon-separated us= er and > + ;; token values. Forgejo doesn't seem to care for the user part but = the > + ;; colon seems to be necessary for the token value to get extracted. > + (authorization . (basic . ,(base64-encode > + (string->utf8 > + (string-append ":" token))))))) > + > +;; Error with a Forgejo request. > +(define-condition-type &forgejo-error &error > + forgejo-error? > + (url forgejo-error-url) > + (method forgejo-error-method) > + (response forgejo-error-response)) > + > +(define %codeberg-organization > + ;; Name of the organization at codeberg.org. > + "guix") > + > +(define* (codeberg-url items #:key (parameters '())) > + "Construct a Codeberg API URL with the path components ITEMS and query > +PARAMETERS." > + (define query > + (match parameters > + (() "") > + (((keys . values) ...) > + (string-append "?" (string-join > + (map (lambda (key value) > + (string-append key "=3D" value)) ;XXX:= hackish Why is the above considered hackish? You could use cut to simplify out the lambda. [...] > +(define* (synchronize-team token team > + #:key > + (current-teams > + (organization-teams token > + %codeberg-organization)) > + (log-port (current-error-port))) > + "Synchronize TEAM, a record, so that its metadata and list of m= embers > +are accurate on Codeberg. Lookup team IDs among CURRENT-TEAMS." > + (let ((forgejo-team > + (find (let ((name (team-id->forgejo-id (team-id team)))) > + (lambda (candidate) > + (string=3D? (forgejo-team-name candidate) name))) > + current-teams))) > + (when forgejo-team > + ;; Delete the previously-created team. > + (format log-port "team '~a' already exists; deleting it~%" > + (forgejo-team-name forgejo-team)) > + (delete-team token forgejo-team)) It'd be nicer to update the team, maybe lighter for the endpoint? What was the rationale for going with this more brute force approach? Was the API complex to use, or not available for this? > + ;; Create the team. > + (let ((forgejo-team > + (create-team token %codeberg-organization > + (or forgejo-team > + (team->forgejo-team team))))) > + (format log-port "created team '~a'~%" > + (forgejo-team-name forgejo-team)) > + (let ((members (filter-map person-codeberg-account > + (team-members team)))) > + (for-each (lambda (member) > + (add-team-member token forgejo-team member)) > + members) > + (format log-port "added ~a members to team '~a'~%" > + (length members) > + (forgejo-team-name forgejo-team)) > + forgejo-team)))) > + > +(define (synchronize-teams token) > + "Push all the existing teams on Codeberg." > + (let ((teams (sort-teams > + (hash-map->list (lambda (_ value) value) %teams)))) > + (format (current-error-port) > + "creating ~a teams in the '~a' organization at Codeberg...~%" > + (length teams) %codeberg-organization) A bit odd to use current-error-port for this message here; I think the other usages of current-error-port were motivated by the fact that the other actions of the script were producing copy-pastable output, so you could redirect the errors somewhere to avoid corrupting it? But that's not an issue here, so I think we should use current-output-port. > + > + ;; Arrange to compute the list of existing teams once and for all. > + (for-each (let ((teams (organization-teams token > + %codeberg-organization))) > + (lambda (team) > + (synchronize-team token team > + #:current-teams teams))) > + teams))) Interesting technique. Apart from having preferred a more surgical approach to update the teams (assuming that would be less overhead for Codeberg), this LGTM. --=20 Thanks, Maxim From unknown Tue Jun 17 01:44:21 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78568] [PATCH 5/5] teams: Add =?UTF-8?Q?=E2=80=98sync-codeberg-teams=E2=80=99?= action. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 27 May 2025 10:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78568 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 78568@debbugs.gnu.org Received: via spool by 78568-submit@debbugs.gnu.org id=B78568.1748341872485 (code B ref 78568); Tue, 27 May 2025 10:32:01 +0000 Received: (at 78568) by debbugs.gnu.org; 27 May 2025 10:31:12 +0000 Received: from localhost ([127.0.0.1]:38975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uJraR-00007k-OZ for submit@debbugs.gnu.org; Tue, 27 May 2025 06:31:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48624) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uJraO-00007M-AI for 78568@debbugs.gnu.org; Tue, 27 May 2025 06:31:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uJraI-0001bE-7b; Tue, 27 May 2025 06:31:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=GiLbK+KUgffMoKdw/FbDHvR7Do83JR1rmEDEniMyzPw=; b=f3UBInGFHeW23dH+JYsQ asq1FMQP8VTYX6EQ9EoWOoQqctNJiYh9MCVRmk/qDwjsHJNm+VoeLbdcK1eu5CejB5nNh30L/MLC0 ve0cFnerKSegaFYsJ57gO7nq0+x2N6R7dIcYuh9g4Sranr9PhGkkXcY1UYZi8RPUAfFIWWv2SNUrY dJ6EkJlwC3Mu349u0QOScdAcFzD+QWwzbQluKByf/rr6QMmtyD4PUpPA86S8LUrx/mmq5YkaCLP5c wnLhUJ5+Uibz/LNE7dEaLIVa48KKn4eXkzkSvO9DQp6AdJxiaTWLVND0juQ5CjQD+zqoWITDAzIeN afGzHFdmCkqYYA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87cybufo85.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 27 May 2025 17:32:26 +0900") References: <87cybufo85.fsf@gmail.com> User-Agent: mu4e 1.12.11; emacs 29.4 X-URL: https://people.bordeaux.inria.fr/lcourtes/ X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu X-Revolutionary-Date: Octidi 8 Prairial an 233 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Martagon Date: Tue, 27 May 2025 12:25:42 +0200 Message-ID: <87tt569wpl.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Maxim, Maxim Cournoyer writes: > That's a sizable amount of code! Maybe we should embark on a > guile-codeberg project at some point to have a library for interacting > with its API. Agreed. >> +(define* (codeberg-url items #:key (parameters '())) >> + "Construct a Codeberg API URL with the path components ITEMS and query >> +PARAMETERS." >> + (define query >> + (match parameters >> + (() "") >> + (((keys . values) ...) >> + (string-append "?" (string-join >> + (map (lambda (key value) >> + (string-append key "=3D" value)) ;XXX= : hackish > > Why is the above considered hackish? You could use cut to simplify > out the lambda. Because it could in theory construct an invalid URL. It=E2=80=99s OK here because we can assume that KEY and VALUE don=E2=80=99t contain things like ampersands, question marks, etc. >> +(define* (synchronize-team token team >> + #:key >> + (current-teams >> + (organization-teams token >> + %codeberg-organization)) >> + (log-port (current-error-port))) >> + "Synchronize TEAM, a record, so that its metadata and list of = members >> +are accurate on Codeberg. Lookup team IDs among CURRENT-TEAMS." >> + (let ((forgejo-team >> + (find (let ((name (team-id->forgejo-id (team-id team)))) >> + (lambda (candidate) >> + (string=3D? (forgejo-team-name candidate) name))) >> + current-teams))) >> + (when forgejo-team >> + ;; Delete the previously-created team. >> + (format log-port "team '~a' already exists; deleting it~%" >> + (forgejo-team-name forgejo-team)) >> + (delete-team token forgejo-team)) > > It'd be nicer to update the team, maybe lighter for the endpoint? What > was the rationale for going with this more brute force approach? Was > the API complex to use, or not available for this? Updating in general is tricky: you would need to check every aspect of the team, compute the diff between the current list of members and the target list of members, etc. It=E2=80=99s more code and it=E2=80=99s hard = to get it right. Since the remove/recreate approach doesn=E2=80=99t have undesirable side ef= fects AFAICS, and since it=E2=80=99s much easier and more reliable, I went for it. >> + (format (current-error-port) >> + "creating ~a teams in the '~a' organization at Codeberg...~= %" >> + (length teams) %codeberg-organization) > > A bit odd to use current-error-port for this message here; I think the > other usages of current-error-port were motivated by the fact that the > other actions of the script were producing copy-pastable output, so you > could redirect the errors somewhere to avoid corrupting it? But that's > not an issue here, so I think we should use current-output-port. It=E2=80=99s in traditional Unix fashion: logging and error messages go to standard error. > Apart from having preferred a more surgical approach to update the teams > (assuming that would be less overhead for Codeberg), this LGTM. Thanks! Ludo=E2=80=99. From unknown Tue Jun 17 01:44:21 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78568] [PATCH 5/5] teams: Add =?UTF-8?Q?=E2=80=98sync-codeberg-teams=E2=80=99?= action. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 May 2025 21:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78568 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 78568@debbugs.gnu.org Received: via spool by 78568-submit@debbugs.gnu.org id=B78568.174846728917710 (code B ref 78568); Wed, 28 May 2025 21:22:01 +0000 Received: (at 78568) by debbugs.gnu.org; 28 May 2025 21:21:29 +0000 Received: from localhost ([127.0.0.1]:57607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uKODG-0004bV-Vu for submit@debbugs.gnu.org; Wed, 28 May 2025 17:21:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43158) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uKOBs-0004PX-5q for 78568@debbugs.gnu.org; Wed, 28 May 2025 17:20:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uKOBk-0000Rs-TQ; Wed, 28 May 2025 17:19:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=FGRJgv8Ld8k8o0loEdUdqp3lVVykP5Xh8Yc4yAtWIDA=; b=fC0IvLHiVcl8pwIQ5STW bWJt2zRNTYFmDc3Gl68xrWi1pEM0FYOxoYESbqwlDDjCPHVew0isH3B1iHQMt4HM0xu2txF3YO3pB ZtXBzcHtegfxGgcKTLw7xVUgbQNxOVRur58/fdxdLa9DINDQENl47O2sWZFSsqii3QLgu2WiSwg0q 1jjkTTfxSZPbyWahtdwxDAL0NKsEfejKMofez4qXhahB39ad+2MrX402MAChcbtVi5UrCDsbWhhK+ fC77n6Irmh8mRLz+F/Zdrj+swDVSQ3X+wvJXrNIxS4KGEv8N1iznKcnotBHq43psflEQVajZFwJDF SG2mR1F57ixPmQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87tt569wpl.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 27 May 2025 12:25:42 +0200") References: <87cybufo85.fsf@gmail.com> <87tt569wpl.fsf@gnu.org> Date: Wed, 28 May 2025 19:46:59 +0200 Message-ID: <877c207hm4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) Hello, Pushed as 848ebb7f72fa529b0a3da47fbef2a6cf6f7fba8a. I added Codeberg account names that people gave on guix-devel in the meantime. There are still a few missing. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed May 28 17:21:29 2025 Received: (at control) by debbugs.gnu.org; 28 May 2025 21:21:29 +0000 Received: from localhost ([127.0.0.1]:57609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uKODI-0004bb-RJ for submit@debbugs.gnu.org; Wed, 28 May 2025 17:21:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43168) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uKOBs-0004PY-Uy for control@debbugs.gnu.org; Wed, 28 May 2025 17:20:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uKOBn-0000SE-K7 for control@debbugs.gnu.org; Wed, 28 May 2025 17:19:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=lzxpCEhOsk3ul6EyG/annRHxzqyjBomSEyuqW87iQKk=; b=UMRwYZBr0EHtcF SRrCwWGjQkDk1yv9vXGovCy2FSgjrelNNu13n94eLxJHz6DT+PfeK7DHfPmlaFEEcJLvW9bBEgeeF W0JWAL8e2aagwGa0qXCtcrtAAnIaDqYiGqsAfpu1QksjGws09RfDePhqxouPr+0BJSMNeF63G+4qY v4cg8EmjNLX+4FTU2Iq1RyIHjCe8qFF7sxnm5WujtDG6b1/yKRxBQ5DqwhOn82iUc8BjL5ZpIGaPb JUJXFVFWJslBZS4LaROJSN7X2R0TNjOogRf3mdvcMtaZ+U54CxgYFxmG19OPwIz5EJIpBxy+GKhtS IeMhLa/HrX95R115PXew==; Date: Wed, 28 May 2025 19:47:03 +0200 Message-Id: <875xhk7hm0.fsf_-_@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #78568 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) close 78568 quit From unknown Tue Jun 17 01:44:21 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78568] [PATCH 5/5] teams: Add =?UTF-8?Q?=E2=80=98sync-codeberg-teams=E2=80=99?= action. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 May 2025 21:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78568 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 78568@debbugs.gnu.org Received: via spool by 78568-submit@debbugs.gnu.org id=B78568.17484691114983 (code B ref 78568); Wed, 28 May 2025 21:52:02 +0000 Received: (at 78568) by debbugs.gnu.org; 28 May 2025 21:51:51 +0000 Received: from localhost ([127.0.0.1]:57759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uKOgg-0001IH-Kz for submit@debbugs.gnu.org; Wed, 28 May 2025 17:51:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57754) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uKOgd-0001Hk-2i for 78568@debbugs.gnu.org; Wed, 28 May 2025 17:51:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uKOgX-00058r-Il; Wed, 28 May 2025 17:51:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=QhbzdWKVH9kg48KR3mqqAw3PAtm7Dh8aFXtObHyaq78=; b=n6n+HL7RAGNXby14tEOZ uykcbI/U6+FvCc1J3ikWCr5Le1j4jJK3mCEP2TxCm5wLHMlsf1sG6iHBncecDaRNQSnKcHsazghG5 ycwJk/+7wGgm4K1lmw9Q/qV+t+fzveMchThY86ykdxhLl9Xv8AWCLnHjBhFKOHGe9yn6LHN1nCLqG fasmCQHyhSo21DqZUH6ey97LUQvvEaLP8W1m0txUeCTz92Jv5AA0Vcnp2Ywi4ynrwGdKjUY3gThFL M/TUqDgKyWyycsxKeoxPLWHHOrPiac0Mnm3rxUknv2nBTCTj2WpcTd59SKzMzA1+wxcYlSwOjbhgb Vs4B2TCcTj9bEA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <877c207hm4.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 28 May 2025 19:46:59 +0200") References: <87cybufo85.fsf@gmail.com> <87tt569wpl.fsf@gnu.org> <877c207hm4.fsf@gnu.org> Date: Wed, 28 May 2025 23:29:48 +0200 Message-ID: <87tt545sqb.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Turns out that the brute-force approach breaks assumptions in Forgejo after all: https://codeberg.org/Codeberg/Community/issues/1952#issuecomment-4899291 So I=E2=80=99ll have to do what you suggested and explicitly synchronize the various bits without deleting/recreating teams. Ludo=E2=80=99.