pr-update-action icon indicating copy to clipboard operation
pr-update-action copied to clipboard

Use custom variables in template body?

Open hxtree opened this issue 2 years ago • 0 comments

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!

hxtree avatar Mar 23 '22 16:03 hxtree