Skip to content

Commit f151cb5

Browse files
author
Tristan payne
committed
feat: remove refs/heads from incoming branch variable
1 parent fba72ac commit f151cb5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/create-branch.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export async function createBranch(github: any, context: Context, branch: string
1414
branchExists = true;
1515
} catch(error) {
1616
if(error.name === 'HttpError' && error.status === 404) {
17+
// Sometimes branch might come in with refs/heads already
18+
branch.replace('refs/heads/', '');
1719
await toolkit.git.createRef({
1820
ref: `refs/heads/${branch}`,
1921
sha: context.sha,

0 commit comments

Comments
 (0)