fix: `check-changed-files`-job always failing on `main` (#969)

pull/976/head
Alex Johansson 2021-10-16 17:35:53 +02:00 committed by GitHub
parent 22c4d29db5
commit f08a2271fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -3,15 +3,14 @@ import { execSync } from "child_process";
const diff = execSync(`git diff --name-only origin/main HEAD`).toString(); const diff = execSync(`git diff --name-only origin/main HEAD`).toString();
const files = diff.trim().split("\n"); const files = diff
.trim()
.split("\n")
.map((file) => file.trim())
.filter(Boolean);
console.log(" Changed files:"); console.log(" Changed files:");
console.log( console.log(files.map((str) => ` - ${str}`).join("\n"));
files
.filter(Boolean)
.map((str) => ` - ${str}`)
.join("\n")
);
try { try {
console.log("⏳ Checking type errors.."); console.log("⏳ Checking type errors..");