Skip to content

Commit ffb5037

Browse files
Switch approach to using prBranchSuffix
1 parent ae973b7 commit ffb5037

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ inputs:
3636
or app who owns the GITHUB_TOKEN.
3737
required: false
3838
default: "git-cli"
39-
branchName:
40-
description: Sets the branch name for the pull request. Default to `changeset-release/{{$github.ref_name}}`
39+
prBranchSuffix:
40+
description: The suffix to include after `changeset-release/` in the PR branch. Defaults to the `branch` variable.
4141
required: false
4242
branch:
4343
description: Sets the branch in which the action will run. Default to `github.ref_name` if not provided

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
126126
commitMessage: getOptionalInput("commit"),
127127
hasPublishScript,
128128
branch: getOptionalInput("branch"),
129-
branchName: getOptionalInput("branchName"),
129+
prBranchSuffix: getOptionalInput("prBranchSuffix"),
130130
});
131131

132132
core.setOutput("pullRequestNumber", String(pullRequestNumber));

src/run.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ type VersionOptions = {
257257
hasPublishScript?: boolean;
258258
prBodyMaxCharacters?: number;
259259
branch?: string;
260-
branchName?: string;
260+
prBranchSuffix?: string;
261261
};
262262

263263
type RunVersionResult = {
@@ -274,9 +274,9 @@ export async function runVersion({
274274
hasPublishScript = false,
275275
prBodyMaxCharacters = MAX_CHARACTERS_PER_MESSAGE,
276276
branch = github.context.ref.replace("refs/heads/", ""),
277-
branchName
277+
prBranchSuffix,
278278
}: VersionOptions): Promise<RunVersionResult> {
279-
let versionBranch = branchName ?? `changeset-release/${branch}`;
279+
let versionBranch = `changeset-release/${prBranchSuffix ?? branch}`;
280280

281281
let { preState } = await readChangesetState(cwd);
282282

0 commit comments

Comments
 (0)