Skip to content

Commit

Permalink
chore: lint source code
Browse files Browse the repository at this point in the history
  • Loading branch information
EndBug committed Jan 23, 2022
1 parent 2103e93 commit 017fbd6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,16 @@ core.info(`Running in ${baseDir}`)
core.info('> Checking for uncommitted changes in the git working tree...')
const changedFiles = (await git.diffSummary(['--cached'])).files.length
// continue if there are any changes or if the allow-empty commit argument is included
if (changedFiles > 0 || matchGitArgs(getInput('commit') || '').includes('--allow-empty')) {
if (
changedFiles > 0 ||
matchGitArgs(getInput('commit') || '').includes('--allow-empty')
) {
core.info(`> Found ${changedFiles} changed files.`)
core.debug(`--allow-empty argument detected: ${matchGitArgs(getInput('commit') || '').includes('--allow-empty')}`)
core.debug(
`--allow-empty argument detected: ${matchGitArgs(
getInput('commit') || ''
).includes('--allow-empty')}`
)

await git
.addConfig('user.email', getInput('author_email'), undefined, log)
Expand Down

0 comments on commit 017fbd6

Please sign in to comment.