Skip to content

Commit 2c100e7

Browse files
committed
style: reformat using printWidth: 100
1 parent 1d35e1e commit 2c100e7

File tree

4 files changed

+8
-18
lines changed

4 files changed

+8
-18
lines changed

.prettierrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
printWidth: 100
3+
}

dist/index.js

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/input.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@
22

33
// https://github.com/actions/toolkit/blob/27f76dfe1afb2b7e5e679cd8e97192d34d8320e6/packages/core/src/core.ts#L128
44
function getInputFromEnv(name: string, options: { required: true }): string
5-
function getInputFromEnv(
6-
name: string,
7-
options?: { required?: false }
8-
): string | undefined
9-
function getInputFromEnv(
10-
name: string,
11-
options: { required?: boolean } = {}
12-
): string | undefined {
5+
function getInputFromEnv(name: string, options?: { required?: false }): string | undefined
6+
function getInputFromEnv(name: string, options: { required?: boolean } = {}): string | undefined {
137
const { required = false } = options
148
const value = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`]
159
if (required && !value) {

src/run.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ export const run = async (): Promise<void> => {
1616
startGroup('Dump inputs')
1717
info(`\
1818
[INFO] GistId: ${input.gistId}${
19-
input.gistDescription === undefined
20-
? ''
21-
: `\n[INFO] GistDescription: ${input.gistDescription}`
19+
input.gistDescription === undefined ? '' : `\n[INFO] GistDescription: ${input.gistDescription}`
2220
}
2321
[INFO] GistFileName: ${fileName}
2422
[INFO] FilePath: ${input.filePath}`)
@@ -41,10 +39,7 @@ export const run = async (): Promise<void> => {
4139
} else {
4240
const git = simpleGit()
4341
const gistDir = await createTempDirectory()
44-
await git.clone(
45-
`https://${input.token}@gist.github.com/${input.gistId}.git`,
46-
gistDir
47-
)
42+
await git.clone(`https://${input.token}@gist.github.com/${input.gistId}.git`, gistDir)
4843
await fs.copyFile(filePath, join(gistDir, fileName))
4944
await git.cwd(gistDir)
5045
await git.add(fileName)

0 commit comments

Comments
 (0)