Reputation: 15946
I create a new environtment for my backend for each commit, this environment have the PR number on the URL.
So I was hopping to create a template so that everytime someone creates a PR the text contains the URL for that enviroment, something like:
Im expecting to have a template pull_request_template.md
like:
# How to test
Url: http://myurl-<PR-number>.myhost.com
And so everytime the PR
# How to test
Url: http://myurl-123.myhost.com
Where 123
is the PR number
Upvotes: 12
Views: 2104
Reputation: 1326746
As illustrated in here and in this discussion, you can have and use multiple template files (adding ?template=MY_PR_TEMPLATE.md
), but not one file with variable content.
In your case, that wouldn't work.
What might work is a Pull Request Action, which would add a label and/or message, with said message being the URL computed automatically from the PR number.
That GitHub Action would help updating any PR with an additional information: the URL you want.
Upvotes: 3