feat(gitlab_release): Toggle var added to enable switching changelog references.
using var 'CHANGELOG_FOOTER_REFERENCES' set to False when generating a changelog with 'cz' will not add the commit footer refrences to the changelog. issue #3
This commit is contained in:
@ -68,8 +68,19 @@ class nfc_cz(BaseCommitizen):
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if footer_references != '':
|
add_references = True
|
||||||
|
try:
|
||||||
|
|
||||||
|
if os.environ['CHANGELOG_FOOTER_REFERENCES'] == 'False':
|
||||||
|
add_references = False
|
||||||
|
|
||||||
|
except KeyError: # continue if the os var doesn't exist
|
||||||
|
add_references = True
|
||||||
|
|
||||||
|
if footer_references != '' and add_references:
|
||||||
footer_references = ' [' + footer_references + ' ]'
|
footer_references = ' [' + footer_references + ' ]'
|
||||||
|
else:
|
||||||
|
footer_references = ''
|
||||||
|
|
||||||
m = parsed_message["message"]
|
m = parsed_message["message"]
|
||||||
parsed_message["message"] = f"[{rev_short}](" + os.environ['CI_PROJECT_URL'] + f"/-/commit/{rev}) - {m}" + footer_references
|
parsed_message["message"] = f"[{rev_short}](" + os.environ['CI_PROJECT_URL'] + f"/-/commit/{rev}) - {m}" + footer_references
|
||||||
|
Reference in New Issue
Block a user