Skip to content

Commit 283cc8f

Browse files
committed
set default for ref parameter to replace task so it doesn't try to reformat the whole function
1 parent fcb49f7 commit 283cc8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gulp.d/tasks/release.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ function addVersionEntry (file, tagName, contents = Buffer.alloc(0)) {
7575
return file
7676
}
7777

78-
module.exports = (dest, bundleName, owner, repo, ref = 'refs/heads/main', token, updateBranch) => async () => {
78+
module.exports = (dest, bundleName, owner, repo, ref, token, updateBranch) => async () => {
7979
const octokit = new Octokit({ auth: `token ${token}` })
80-
let variant = ref.replace(/^refs\/heads\//, '')
80+
let variant = ref ? ref.replace(/^refs\/heads\//, '') : 'main'
8181
if (variant === 'main') variant = 'prod'
8282
ref = ref.replace(/^refs\//, '')
8383
const tagName = `${variant}-${await getNextReleaseNumber({ octokit, owner, repo, variant })}`

0 commit comments

Comments
 (0)