Skip to content

Commit cd27baf

Browse files
committed
fix: git author identity
1 parent 2c100e7 commit cd27baf

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

dist/index.js

Lines changed: 3 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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ export const run = async (): Promise<void> => {
4040
const git = simpleGit()
4141
const gistDir = await createTempDirectory()
4242
await git.clone(`https://${input.token}@gist.github.com/${input.gistId}.git`, gistDir)
43-
await fs.copyFile(filePath, join(gistDir, fileName))
4443
await git.cwd(gistDir)
44+
await git.addConfig('user.name', process.env.GITHUB_ACTOR!)
45+
await git.addConfig('user.email', `${process.env.GITHUB_ACTOR}@users.noreply.github.com`)
46+
await fs.copyFile(filePath, join(gistDir, fileName))
4547
await git.add(fileName)
4648
await git.commit(`Add ${fileName}`)
4749
await git.push('origin', 'master')

0 commit comments

Comments
 (0)