File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @changesets/action " : patch
3+ ---
4+
5+ Allow customize branch name
Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ 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}}`
41+ required : false
3942 branch :
4043 description : Sets the branch in which the action will run. Default to `github.ref_name` if not provided
4144 required : false
Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
126126 commitMessage : getOptionalInput ( "commit" ) ,
127127 hasPublishScript,
128128 branch : getOptionalInput ( "branch" ) ,
129+ branchName : getOptionalInput ( "branchName" ) ,
129130 } ) ;
130131
131132 core . setOutput ( "pullRequestNumber" , String ( pullRequestNumber ) ) ;
Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ import {
2020
2121const require = createRequire ( import . meta. url ) ;
2222
23- // GitHub Issues/PRs messages have a max size limit on the
23+ // GitHub Issues/PRs messages have a max size limit on th
24+
25+
2426// message body payload.
2527// `body is too long (maximum is 65536 characters)`.
2628// To avoid that, we ensure to cap the message to 60k chars.
@@ -257,6 +259,7 @@ type VersionOptions = {
257259 hasPublishScript ?: boolean ;
258260 prBodyMaxCharacters ?: number ;
259261 branch ?: string ;
262+ branchName ?: string ;
260263} ;
261264
262265type RunVersionResult = {
@@ -273,8 +276,9 @@ export async function runVersion({
273276 hasPublishScript = false ,
274277 prBodyMaxCharacters = MAX_CHARACTERS_PER_MESSAGE ,
275278 branch = github . context . ref . replace ( "refs/heads/" , "" ) ,
279+ branchName
276280} : VersionOptions ) : Promise < RunVersionResult > {
277- let versionBranch = `changeset-release/${ branch } ` ;
281+ let versionBranch = branchName ?? `changeset-release/${ branch } ` ;
278282
279283 let { preState } = await readChangesetState ( cwd ) ;
280284
You can’t perform that action at this time.
0 commit comments