Skip to content

Commit 01ed8e5

Browse files
committed
fix: gist repo default branch name
1 parent 0c5c599 commit 01ed8e5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dist/index.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/run.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ export const run = async (): Promise<void> => {
4949
await fs.copyFile(filePath, join(gistDir, fileName))
5050
await git.add(fileName)
5151
await git.commit(`Add ${fileName}`)
52-
await git.push('origin', 'master')
52+
const branch = await git.revparse(['--abbrev-ref', 'HEAD'])
53+
await git.push('origin', branch)
5354
}
5455
info(`[INFO] Done with gist "${input.gistId}/${fileName}"`)
5556
endGroup()

0 commit comments

Comments
 (0)