Hi! On 2024-10-23T17:33:38+0100, Jonathan Wakely <jwakely....@gmail.com> wrote: > On Wed, 23 Oct 2024 at 16:14, Sam James <s...@gentoo.org> wrote: >> I think we want a way to link commits to any possible reviews or >> discussions on the forge (*). >> >> freedesktop.org projects use 'Part-of' in each commit as a trailer >> linking to the relevant Pull Request (PR) / Merge Request (MR). I don't >> know what tooling handles this or if it's built-in to gitlab. > > e.g. Part-of: <mesa/mesa!31746> at > https://gitlab.freedesktop.org/mesa/mesa/-/commit/ebd67382604d0b7bddf2ebd2aa824a272e8e9bb2 > > That's just built in to gitlab and also forgejo, e.g. > https://forge.sourceware.org/redi/gcc/pulls/1#issuecomment-48 > Any text in that form in a commit msg or issue comment will get linked.
> I can see that being a problem. We have hundreds, if not thousands, of > commits where the message refers to a Bugzilla bug as #1234 which will now > "magically" link to an issue or pr in a Forgejo repo, but those IDs are > completely unrelated to the Bugzilla IDs. Right. I assume we have to consider any unadorned '#N', 'PRNNN', 'PR COMPONENT/NNN' (have to check the exact patterns) to be "owned" by GCC: Bugzilla, and that's not going to change any time soon. Therefore, we have to teach <https://forge.sourceware.org/> to only auto-link the scoped ones (like, <https://forge.sourceware.org/redi/gcc/pulls/1#issuecomment-48>?), and leave all unadorned others alone (or rather-link them to what's currently expected in GCC: Bugzilla.) > We should ask the gccrs devs to > stop using Issue #2514 to refer to issues in their external github repo. > They could use Rust-GCC/gccrs#1234 instead, which won't refer to some > arbitrary #1234 in an unrelated repo. e.g. for gccgo the commits include > things like "Fixes golang/go#33739" which is fine, the ID is scoped so > won't link to the wrong thing. I've filed <https://github.com/Rust-GCC/gccrs/issues/3213> "[meta] Enforce scoped Rust-GCC/gccrs#NNN instead of unadorned #NNN in Git commit logs". > There's a feature request for Forgejo to support custom auto-link: > https://codeberg.org/forgejo/forgejo/issues/3274 > That would allow us to make rNN-NNNN and similar GCC conventions work from > commit messages. Grüße Thomas