Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous cleanup #35

Merged
merged 10 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Balto - Eslint"
description: "Run eslint on your repo"
name: "Balto - ESLint"
description: "Run ESLint on your repo"
runs:
using: node20
main: dist/index.js
Expand Down
6 changes: 3 additions & 3 deletions devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"cp test/snapshots/base/* test/v7",
"cp test/snapshots/base/* test/v8",
"cp test/snapshots/base/* test/v9",
"git add . && git commit -m 'Undo simulated changes'",
"git add . && git commit -m 'Automated: Undo simulated changes'",
"echo \"{ \\\"pull_request\\\": { \\\"base\\\": { \\\"sha\\\": \\\"$(git rev-parse HEAD)\\\" } } }\" > test/pull_request_event_payload.json",
"git add . && git commit -m 'Update test target sha'",
"git add . && git commit -m 'Automated: Update test target sha'",
"cp test/snapshots/updates/* test/v6",
"cp test/snapshots/updates/* test/v7",
"cp test/snapshots/updates/* test/v8",
"cp test/snapshots/updates/* test/v9",
"git add . && git commit -m 'Simulate changes'"
"git add . && git commit -m 'Automated: Simulate changes'"
]
}
}
Expand Down
3 changes: 2 additions & 1 deletion dist/index.js

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

3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ async function run() {

core.debug(`Changed files: ${changedFiles}`)

let { stdout: eslintOut } = await getExecOutput(
let { stdout: eslintOut, exitCode } = await getExecOutput(
"npx eslint --format=json",
changedFiles,
// Eslint will return exit code 1 if it finds linting problems, but that is
// expected and we don't want to stop execution because of it.
{ ignoreReturnCode: true },
)
let eslintJson = JSON.parse(eslintOut)
core.debug(`Eslint exit code: ${exitCode}`)

let promises: Array<Promise<EslintResult>> = eslintJson.map(
(resultObject: ResultObject) => EslintResult.for(resultObject, compareSha),
Expand Down
Loading