Hi,

Felix Lechner <felix.lech...@lease-up.com> writes:

> Hi Gio',
>
> On Thu, Sep 7, 2023 at 4:08 AM Giovanni Biscuolo <g...@xelera.eu> wrote:
>>
>> close the bugs that are listed in
>> the commit message
>
> Perhaps you'd like to see Debian's hook [1] for the Salsa web forge
> (which is controversially based on Gitlab).
>
> The regex does not work properly for more than two bugs, however, so
> here is my proposed fix. [2] The merge request was closed
> automatically when I began contributing to Guix.

Did you see my message about integrating a commit-hook similar to what
Gerrit uses?  It produces unique ID such as:

--8<---------------cut here---------------start------------->8---
Change-Id: I9b86781869d80eda347659f0c009b8dfe09bdfd0
--8<---------------cut here---------------end--------------->8---

at the bottom (it's a git trailer) of a commit message.  Being unique,
these could be used to match if a patch on the tracker has been merged
in the master branch.

Attached is what the hook looks like.  The random 'Change-Id' is
generated via

--8<---------------cut here---------------start------------->8---
random=$({ git var GIT_COMMITTER_IDENT ; echo "$refhash" ; cat "$1"; } |
  git hash-object --stdin)
--8<---------------cut here---------------end--------------->8---

Attachment: commit-msg
Description: Binary data

-- 
Thanks,
Maxim

Reply via email to