Skip to content

Commit

Permalink
refactor: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
exuanbo committed Jun 10, 2022
1 parent 7f746ca commit e998ee5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export const run = async (): Promise<void> => {
const input = getInput()
const { token, gistId, gistDescription } = input

const workspace = process.env.GITHUB_WORKSPACE!
const filePath = join(workspace, input.filePath)
const filePath = join(process.env.GITHUB_WORKSPACE!, input.filePath)
const fileName = input.gistFileName ?? basename(filePath)

const fileType = input.fileType === 'binary' ? 'binary' : 'text'
Expand All @@ -33,12 +32,7 @@ export const run = async (): Promise<void> => {
await octokit.rest.gists.update({
gist_id: gistId,
description: gistDescription,
files: {
[fileName]: {
fileName,
content
}
}
files: { [fileName]: { fileName, content } }
})
} else {
const git = simpleGit()
Expand Down

0 comments on commit e998ee5

Please sign in to comment.