From patchwork Fri Apr 18 09:08:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 41758 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 808D027BC4B; Fri, 18 Apr 2025 10:10:18 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4B00327BC49 for ; Fri, 18 Apr 2025 10:10:18 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u5hjh-0006KR-W3; Fri, 18 Apr 2025 05:10:14 -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 1u5hjf-0006JP-OM for guix-patches@gnu.org; Fri, 18 Apr 2025 05:10:11 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u5hjf-0004jw-55 for guix-patches@gnu.org; Fri, 18 Apr 2025 05:10:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=7+QbGkcM51OaSV48KYKG6hCrNdSwMTKGd68GQm91YZA=; b=OufRmn+7rfTEoLcBmmlggXABXfwqzyWN0EW+A/Z/44Z3BOp6G7olqpJxeQ57inBpfKHTy/c3FFkbWbpDf+zY6B1JY6lLOwduR4HLybNLQsOoUd7cg6MaTb7W69aOZ86JJuQ6UVJv+FQzbcoFRTQTLzoTM/Ev4Fz15lE3rL7FBkPFZbbOKBELtDSowZjG1ZlaFzI5KqKW2iiaSaR/CN1ciRZDWZdTdGpK3NfbwIuIpborP/FBf52OfLG6deQMkquL/+7j1GywjNIWNlzfB1eWssGRNh//VMXP9YMAgV3b3B0sQrATZSadt3uwn7x81RzKqtqPKtHMkdejwYFmqmSnUA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u5hje-0003BP-OC for guix-patches@gnu.org; Fri, 18 Apr 2025 05:10:10 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#76503] [GCD] Migrating repositories, issues, and patches to Codeberg Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Apr 2025 09:10:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76503 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 76503@debbugs.gnu.org, Guix Devel Received: via spool by 76503-submit@debbugs.gnu.org id=B76503.174496737211719 (code B ref 76503); Fri, 18 Apr 2025 09:10:10 +0000 Received: (at 76503) by debbugs.gnu.org; 18 Apr 2025 09:09:32 +0000 Received: from localhost ([127.0.0.1]:49685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5hiy-00032G-59 for submit@debbugs.gnu.org; Fri, 18 Apr 2025 05:09:31 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:58616) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u5hih-0002y8-3r for 76503@debbugs.gnu.org; Fri, 18 Apr 2025 05:09:14 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-43cf05f0c3eso12096155e9.0 for <76503@debbugs.gnu.org>; Fri, 18 Apr 2025 02:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744967345; x=1745572145; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=7+QbGkcM51OaSV48KYKG6hCrNdSwMTKGd68GQm91YZA=; b=atiQF/+0Qk6iwfdIZ8KirArO2LmHVArtYB6Bhb0cvEBQLGruIkvb2O1Uq5EDy81tQ4 OA2zdOckegf2QEbd+VRKeGUKPKILXeHb8xzxwad3y2NgaAvzV0vySijFe13SDD6KKAK7 1dMk/yO/PJre/B6jiX9uMug7iZFKV1BYJfnfjl/sa3kYS+DMRpmaB04vSI7hnaeTlPnl aptAXpT10vIjLvjBh8oPs4CuZ/kF9Iui9VNbNw4xEMjb9jsvcz2nYh0vNIuw7ddmH7Br s9wmRBFm/FWVvjCwXIaFpPRjx4/EeyTlr+/ormnfcaEVX0cE2oVLTuHSTIYdSMPHWeSi uVJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744967345; x=1745572145; h=mime-version: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=7+QbGkcM51OaSV48KYKG6hCrNdSwMTKGd68GQm91YZA=; b=e95DULedFTVDVKo4pr8F0Vk+Yua6daqZUa+91Gr8+pd7CopiOt7IDIn4UwRBd06ZSG 8bKRXu5WjbMYMKmWN5qSsTKixokmTHLyoh29HKBTUz31U5d7robZVejC0ZZSiLjk2AFw dcV/D9ytdumnaDKBY3bSflvIlTK8e21QHqUYIAZ3VfVGA+SaSxbPVXbsg4dq6zTxO1Nu E03woP9FujGgw0vsrMYFghnVJBul/nUgxdcDiRH7EM3XKaN/PQa0OjOeAErNaZhdeaq6 5IQ1yG8/2YeEd60fGTu0F/TxGr8p1BR3vwm6O+Et32IFveEtShmIQVO9DvyMORNzs9Ip lxYA== X-Gm-Message-State: AOJu0YwtCNZncG0zocZgRJltDywXoASp33aBQnGbxfsty+5OKg5QArqJ XIndluu/v6qSOGLSlwV8cTKT8G2u1n2FaQzwQWgRIw1c3NOQftLM X-Gm-Gg: ASbGncvqTKNxP3y2qyi4cLTBNwQR83R1GT622ipJJGuC/3bG4OWljWFeHnB+nW91fJs Nv9GYKmPm4hfuN6c59DDM/3Cde2LqRXIeRrm+Mc5oqnEnEbMY0Ekl4X4ymU9o+2d7oGxaXepRVj HfVlKMiWFbKscWO1nIwpxfBV8GhU+31ZwzWfRTVq2yhNPORFAKL1yar+NsNx/uLN+DK8pOiO070 s4ho4XtUWfN5zYDCfpD7GGeF2jl5oAOHHVzOP2mRbpMUZGXF8vzu2O8pPS8NywdFNCAI6CsWhc2 gz32kJsNDuXM3g5BFxy5nEAXoOXniZfwJHvCFnI= X-Google-Smtp-Source: AGHT+IG/dliUQk4z8OLPaNBvPYqR8+gbA4wG+2dHwDLBV/FqPbd9CzIal+wKwKard+PhqEKCTniHQw== X-Received: by 2002:a05:600c:1e0c:b0:43d:82c:2b11 with SMTP id 5b1f17b1804b1-4406ac0eb5fmr14953795e9.23.1744967344526; Fri, 18 Apr 2025 02:09:04 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:aa5c:e81d:ee55:5494]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4406d5ccd43sm14515485e9.26.2025.04.18.02.09.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Apr 2025 02:09:03 -0700 (PDT) From: Simon Tournier In-Reply-To: <87bjsu1sdr.fsf@gnu.org> References: <87wmdgznzx.fsf@inria.fr> <87bjsuoht3.fsf@gmail.com> <87bjsu1sdr.fsf@gnu.org> Date: Fri, 18 Apr 2025 11:08:55 +0200 Message-ID: <87ikn196qg.fsf@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hi Ludo, Ah, I forgot: I would remove the mention to your usual login civodul and instead use classical aubrey or blake or carol or dana or … :-) On Thu, 17 Apr 2025 at 21:48, Ludovic Courtès wrote: >> Last, it appears to me a good idea to also provide the tip for removing >> closed pull requests; because it’s not straightforward – at least, it >> was not obvious for me before I did my homework. :-) > > That’s the ‘prs-clean’ alias you provided, right? Yes. To me, it was not obvious how to delete a local reference and clean my local repository. Somehow, I’m thinking to the future myself in some months or in 2 years: I read the GCD for fun and profit and see oh cool, nice tip! Let run “git fetch pulls”… and bang it downloads hundreds (or thousand?) of pull requests containing thousands of commits. Oops! Now I need to clean because I do not care about the hundreds of already merged pull requests. > We can add it, but maybe it’s best to keep it for some developer > documentation? (I did not intend this part of the GCD to be > documentation; rather my goal was to give an overview of the available > interfaces.) I agree. All the tips are only appetizers (make us want to cook) and not some real meal (make us full). My point reads: 1) The document provide a “lengthy“ example of fj.el. And we are not all Emacs users. 2) The tip ’git fetch pulls’ is almost useless for a regular reviewer. I mean in practice, it’s almost useless or bazooka. Who care to download all the pull requests? Download even all the closed ones, and then manually trigger or look for the ones of interest. 3) This tip ’git fetch pulls’ does not expose Forgejo API. That’s why, IMHO, the tip ’git fetch pulls’ should be replaced either by a plain paragraphs, or either by some short and minimal examples exposing how to exploit the API, or either by a mix of both. All in all, I propose this: And the part ’git update-ref -d refs/pullreqs/123’ let as an exercise. ;-) As said, it’s appetizer and not a complete documentation. > -However the author thinks that, as it stands, Guix system administrators > +However, at the moment, Guix system administrators > have more than enough on their plate and are perhaps not up to the task > of providing the availability guarantees we expect from such a service. > +Whether to self-host is something that could be revisited in the future. LGTM. Cheers, simon diff --git a/002-codeberg.md b/002-codeberg.md index f931354..4a63c9f 100644 --- a/002-codeberg.md +++ b/002-codeberg.md @@ -348,13 +348,28 @@ As a reviewer, it is possible to pull references of pending pull requests by adding something like this to `.git/config`: ``` -[remote "pulls"] - url = git@codeberg.org:org/guix-science/guix-science.git - fetch = +refs/pull/*/head:refs/remotes/pulls/pr/* +[alias] + prs-fetch="!f() { for pr in \ + $(curl -s 'https://codeberg.org/api/v1/repos/guix-science/guix-science/pulls?state=open' \ + | sed 's/,/\\n/g' | grep number | cut -f2 -d':' | sed 's/,//g'); \ + do echo Fetch: $pr; \ + git fetch -f -u origin pull/$pr/head:pull/$pr/head ;done \ + }; echo Fetch open PRs; f" ``` -Running `git fetch pulls` then retrieves references to branches -corresponding to all the pull requests. +Running `git prs-fetch` then retrieves references to branches +corresponding to the pending pull requests. + +In addition, one may fetch the list of [closed pull requests as +JSON](https://codeberg.org/api/v1/repos/guix-science/guix-science/pulls?state=closed), +extract the number of a pull request of interest, and clean just this +pull request with: + +``` +git update-ref -d refs/heads/pull/123/head +``` + +… where `123` is the pull request number. ## Teams