From 72e8b6c84defdb903c5741e3469651987769713f Mon Sep 17 00:00:00 2001 From: Jon Lockwood Date: Wed, 4 Aug 2021 11:16:44 +0930 Subject: [PATCH] refactor(gitlab_release): build gitlab commit url for changelog so that there is a weblink to the changes The mirror on github, did not have the commit hashes as links to the commit. Now a full gitlab commit URL is built as part of the changelog. #1 --- gitlab_release/python-module/cz_nfc/cz_nfc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab_release/python-module/cz_nfc/cz_nfc.py b/gitlab_release/python-module/cz_nfc/cz_nfc.py index 362d2be..721be3b 100755 --- a/gitlab_release/python-module/cz_nfc/cz_nfc.py +++ b/gitlab_release/python-module/cz_nfc/cz_nfc.py @@ -26,7 +26,7 @@ class nfc_cz(BaseCommitizen): def changelog_message_builder_hook(self, parsed_message: dict, commit: git.GitCommit) -> dict: rev = commit.rev m = parsed_message["message"] - parsed_message["message"] = f"{rev} - {m}" + parsed_message["message"] = f"[{rev}]($CI_PROJECT_URL/-/commit/{rev}) - {m}" return parsed_message