Skip to content

Commit e998ee5

Browse files
committed
refactor: minor
1 parent 7f746ca commit e998ee5

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

dist/index.js

Lines changed: 2 additions & 8 deletions
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 & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ export const run = async (): Promise<void> => {
1010
const input = getInput()
1111
const { token, gistId, gistDescription } = input
1212

13-
const workspace = process.env.GITHUB_WORKSPACE!
14-
const filePath = join(workspace, input.filePath)
13+
const filePath = join(process.env.GITHUB_WORKSPACE!, input.filePath)
1514
const fileName = input.gistFileName ?? basename(filePath)
1615

1716
const fileType = input.fileType === 'binary' ? 'binary' : 'text'
@@ -33,12 +32,7 @@ export const run = async (): Promise<void> => {
3332
await octokit.rest.gists.update({
3433
gist_id: gistId,
3534
description: gistDescription,
36-
files: {
37-
[fileName]: {
38-
fileName,
39-
content
40-
}
41-
}
35+
files: { [fileName]: { fileName, content } }
4236
})
4337
} else {
4438
const git = simpleGit()

0 commit comments

Comments
 (0)