Support standard path variable replacement syntax#3536
Conversation
|
Hi! Thanks for the pull request. Please ensure that this change is linked to an issue by mentioning an issue number in the description of the pull request. If this pull request would close the issue, please put the word 'Fixes' before the issue number somewhere in the pull request body. If this is a tiny change like fixing a typo, feel free to ignore this message. |
|
This is great; thank you! Please do update the documentation to use |
|
I've updated the docs and the tests, except for the greedy substitution test. The existing pattern uses |
Add support for the following synonyms:
{owner} for :owner
{repo} for :repo
{branch} for :branch
Since the |
|
Thanks for the quick review :) |
|
Add support for the following synonyms:
{owner} for :owner
{repo} for :repo
{branch} for :branch
If accepted in principle I would like to also update the example docs in this file to use the
{var}syntax, perhaps with a note that:varis also supported. I would also extend the test cases.The motivation for this change is that
:varis a Rails-ism, and{var}is more standard. I was particularly motivated to submit this as docs.github.com changed to use{var}, which means that it is not currently possible to cut and paste a URL from the API docs (e.g. Code Scanning) right to the command line.