I'd like to be able to pass the sourceBranch token into the branch name so that pushes made from the 1.2.0 branch get pushed to the 1.2.0 remote branch.
branch: '%sourceBranch%',
I can easily replicate the functionality by reusing this replace function down in the try section, but i'm guessing there might be a more complete way to do this? Is there value in supporting all of the tokens in the branch name? How about the tag name? Should we create a reusable function where we can pass a string and have it 'tokenized'.
options.branch = options.branch.replace(/%sourceBranch%/g, tokens.branch);