At the moment, ticket descriptions are provided via the YAML config.
That's fine for short ticket descriptions, but short descriptions are the devil. Although it's possible to include longer descriptions in YAML it could quite quickly get unwieldy.
I'd like to add a description_file
attribute to ticket config - this would provide the name of a file which contains the desired description for that ticket.
All template files should be under a well-known directory, and would be read in as plain text.
Activity
10-Sep-24 18:46
assigned to @btasker
10-Sep-24 19:01
mentioned in commit b2ad4c24256b5b33fe1fdc4a2e10bd5d100d3920
Message
feat: implement support for loading ticket descriptions from file (utilities/gitlab_recurring_issue#12)
10-Sep-24 19:06
Using the word "template" is probably setting expectations a little higher than we've achieved here (but is representative of where we eventually want to get). Currently there's no subsitution at all - whatever is in the file will be written into Gitlab, verbatim.
The
description_file
attribute can be used on a ticket config to specify a file to read and use as the description.That file must have the suffix
.template
, if it's missing it'll be appended - the idea being to make sure a misconfig doesn't lead to someone have/etc/shadow
written into a ticket or other similar horrors.The file should be within the templates dir - that defaults to
/templates
but can be overridden in env varTEMPLATE_DIR
.