Skip to content

Commit 1687927

Browse files
committed
dev-tools/gerrit-send-mail.py: include Gerrit URL into the commit message
We used to reference to one of the mailing list archives as the formal reference for the patch and the review discussions. With the problematic reliability of the archives, I've started to manually add the URLs in the OpenVPN Gerrit to the commits because they give a better reference and (usually) all the feedback is there in a useful format. So, enhance this dev-tool script to do this automatically. Change-Id: Idb137ecbade4b0584a4d74aee34978062e247bc5 Signed-off-by: Gert Doering <[email protected]> Acked-by: Frank Lichtenheld <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1196 Message-Id: <[email protected]> URL: https://sourceforge.net/p/openvpn/mailman/message/59234672/ Signed-off-by: Gert Doering <[email protected]>
1 parent 5681535 commit 1687927

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dev-tools/gerrit-send-mail.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,21 @@ def apply_patch_mods(patch_text, details, args):
9999
assert comment_start > signed_off_end
100100
acked_by_text = ""
101101
acked_by_names = ""
102+
gerrit_url = f"{args.url}/c/{details['project']}/+/{args.changeid}"
102103
for ack in details["acked_by"]:
103104
acked_by_text += f"Acked-by: {ack}\n"
104105
acked_by_names += f"{ack}\n"
105106
patch_text_mod = (
106107
patch_text[:signed_off_end]
107108
+ signed_off_text
108109
+ acked_by_text
110+
+ f"Gerrit URL: {gerrit_url}\n"
109111
+ patch_text[signed_off_end:comment_start]
110112
+ f"""
111113
This change was reviewed on Gerrit and approved by at least one
112114
developer. I request to merge it to {details["target"]}.
113115
114-
Gerrit URL: {args.url}/c/{details["project"]}/+/{args.changeid}
116+
Gerrit URL: {gerrit_url}
115117
This mail reflects revision {details["revision"]} of this Change.
116118
{signed_off_comment}
117119
Acked-by according to Gerrit (reflected above):

0 commit comments

Comments
 (0)