Closed megawubs closed 7 years ago
I suggest to use jinja to do the templating.
Something like that:
{% title, *body = repository.commit().message.split('\n') %}
### Title
{{ title }}
### Body
{{ '\n'.join(body) }}
{% match = re.match(repository.head.name, r'^(?P<branch_commit>\d+).*') %}
{% if match %}
closes {{ match.groupdict()['branch_commit'] }}
{% endif %}
cf #122
For example I'm working in a gitlab environment where issues are leading and I want to have the text
Resovle: "[issue title]"
as the title by default andcloses #{issue-number}
as the message. For this to work, we need some sort of templating system with simple if/then and some variables and string regex checksVariables (from the top of my head):
Example pseudo template: