We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bce8fa9 commit bf0e555Copy full SHA for bf0e555
1 file changed
src/github/pullRequestGitHelper.ts
@@ -368,11 +368,16 @@ export class PullRequestGitHelper {
368
}
369
370
371
+ /**
372
+ * Performs variable substitution for PR checkout branch names.
373
+ * Note: This is separate from the variableSubstitution in utils.ts because
374
+ * the semantics differ - ${owner} refers to the PR author, not the repo owner.
375
+ */
376
private static prBranchNameVariableSubstitution(
377
template: string,
378
pullRequest: PullRequestModel,
379
): string {
- const VARIABLE_PATTERN = /\$\{([^}]*?)\}/g;
380
+ const VARIABLE_PATTERN = /\$\{([^-]*?)(-.*?)?\}/g;
381
return template.replace(VARIABLE_PATTERN, (match: string, variable: string) => {
382
switch (variable) {
383
case 'owner':
0 commit comments