pr-update-action
pr-update-action copied to clipboard
Use custom variables in template body?
I'd like to be able to populate a sandbox URL in the template body. Is this available? Any recommendation on how to proceed?
I'd probably need to do some parsing beforehand, could be done in a prior job e.g. branch name starts off as "hotfix/jira-2434-fixed-whitespace-issue".
# kebab-case branch naming convention pattern:
# {type}/{id}-{short-description}
subdomain-suffix = '-app';
subdomain = "{id}-{short-description}{subdomain-suffix}"
domain = 'example.com';
url = https://{subdomain}.{domain}/
Sandbox: %url%
Thus the template body gets updated like so:
Sandbox: https://jira-2434-fixed-whitespace-issue-app.sandbox.example.com/
Thank you!