guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [workflow] Automatically close bug report when a patch is committed


From: Maxim Cournoyer
Subject: Re: [workflow] Automatically close bug report when a patch is committed
Date: Thu, 07 Sep 2023 09:09:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi,

Felix Lechner <felix.lechner@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

[Prev in Thread] Current Thread [Next in Thread]