Subject: [bug#76503] [GCD] Migrating repositories, issues, and patches to Codeberg

From: Ludovic Courtès <[email-masked]>
Date: Thu, 17 Apr 2025 21:48:32 +0200

Hello,

Simon Tournier <[email-masked]> writes:

> I think it is misleading.  Because this does not really « pull
> references of pending PRs » but retrieve « all the PRs ».  Therefore,
> then one needs to manually find their way.
>
> Well, although I’m sure Git scripts are around, it appears to me a good
> opportunity to show how the API is easy to exploit.  For instance, I
> propose this:

Thanks, I keep learning!  How about this patch:

diff --git a/002-codeberg.md b/002-codeberg.md
index f931354..349cea5 100644
--- a/002-codeberg.md
+++ b/002-codeberg.md
@@ -344,7 +344,7 @@ git push origin HEAD:refs/for/main  \
   -o description='This updates the `hello` package."
 ```
 
-As a reviewer, it is possible to pull references of pending pull
+As a reviewer, it is possible to pull references of pull
 requests by adding something like this to `.git/config`:
 
 ```
@@ -356,6 +356,17 @@ requests by adding something like this to `.git/config`:
 Running `git fetch pulls` then retrieves references to branches
 corresponding to all the pull requests.
 
+In addition, one may fetch the list of [open pull requests as
+JSON](https://codeberg.org/api/v1/repos/guix-science/guix-science/pulls?state=open),
+extract the number of a pull request of interest, and retrieve just this
+pull request with:
+
+```
+git fetch -u origin pull/123/head:pull/123/head
+```
+
+… where `123` is the pull request number.
+
 ## Teams
 
 All the teams currently defined in `etc/teams.scm` will be reified as

> 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?

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 understand the intent of the last sentence.  Well, I would not close
> the door this way.  And I would remove the mention of “author” – it’s a
> Consensus Document after all. :-) Nitpicking for the very last part.

How about this smaller change:

@@ -485,9 +496,10 @@ values of Guix—it is not uncommon for similar projects to do that, an
 example being the [Lix project](https://git.lix.systems/); there even
 exists a [preliminary Forgejo service for
 Guix](https://git.boiledscript.com/hako/Rosenthal/src/commit/7a6a28e872b3168f9b6513ccf797e247cd8a366d/rosenthal/services/web.scm#L32).
-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.
 
 As of this writing, Forgejo integration in Cuirass is functional but
 partial (useful configuration options and hardening mechanisms are

?

> To complement a chat we had IRL some weeks ago, let me point you the
> public message [1] containing my 4 requirements and my potential query
> for write-access suspension while I will not have a setup that fulfills
> them.

Noted.

> Last but not least, I support the outcome of this GCD. I know it’s not
> yet the Deliberation Period and this will not be taken into account.
> But I will be offline for some weeks and it appears to me worth to
> express my plain support.

Thanks!

Ludo’.