Gentoo Archives: gentoo-dev

From: Agostino Sarubbo <ago@g.o>
To: gentoo-dev@l.g.o
Cc: Michael Orlitzky <mjo@g.o>
Subject: Re: [gentoo-dev] Feature request: auto-CC for bugs modified via commit tags
Date: Tue, 25 Jan 2022 21:00:50
Message-Id: 4170395.ejJDZkT8p0@spectre
In Reply to: [gentoo-dev] Feature request: auto-CC for bugs modified via commit tags by Michael Orlitzky
1 On martedì 25 gennaio 2022 18:00:30 CET Michael Orlitzky wrote:
2 > Can I request that Bug: and Closes: tags in our commits automatically
3 > CC the committer on the bug that is modified?
4 >
5 > Use case: I often fix (sci-*) bugs that I'm not CCed on, and a user
6 > will leave a comment like "it still crashes on x86" that I never see.
7 > Of course, I could manually CC myself on every bug. But that will send
8 > everyone an extra email, and is forgettable. Plus, avoiding the manual
9 > step is kind of the point of the automation, right?
10 >
11 > One potential downside is that the commit author could wind up CCed
12 > twice via an alias, but that could be solved with a sufficiently clever
13 > implementation. Or disregarded if it's not too much of a problem in
14 > practice; the bugs will usually be closed, after all.
16 While it does not hurt implement an hook I'd say that:
18 - CI already cc'es the author of the commit when he breaks a package or introduces a QA
19 issue.
20 This is related to a new bugs and, obviously, does not cover your use-case.
22 - If you are CC'ed by the hook and you are part of the alias that is the assignee of the bug,
23 you will receive two emails unless the hook integrates the alias.
25 - Based on the previous point, I'd suggest to use a wrapper if you want to be cc'ed on the
26 bug you are resolving:
29 #!/bin/bash
31 BUG="${1}"
34 repoman commit -c "${BUG}" -m "${COMMIT_MESSAGE}" && bugz --key "${APIKEY}"
35 modify --add-cc name@g.o "${BUG}"
38 Agostino