Skip to content

Commit

Permalink
fix: checkout & update script
Browse files Browse the repository at this point in the history
  • Loading branch information
luckasRanarison committed Nov 4, 2024
1 parent 7aa0641 commit f61d1b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/linear-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 20
Expand Down
12 changes: 9 additions & 3 deletions tools/linear-checker/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ for (const issue of issues) {
`Error: A Linear ticket was not found for the issue "${type}: ${desc}" in the file "${file}" at line ${line}.`,
"Consider creating a Linear ticket for this issue and referencing it in the comment.",
);
console.error(`\nSource: ${source}\n`);
console.error(`${line} | ${source}`);
foundInvalidIssue = true;
} else {
const issue = await getIssue(ticket);
Expand All @@ -78,12 +78,18 @@ for (const issue of issues) {
console.error(
`Error: The ticket MET-${ticket} referenced in the file "${file}" at line ${line} does not exist`,
);
console.error(`\nSource: ${source}\n`);
console.error(`${line} | ${source}`);
foundInvalidIssue = true;
} else {
console.info(
`Info: Found a Linear ticket "MET-${ticket}" in the file "${file}" at line ${line} (${type}: ${desc})`,
);
}
}
}

if (foundInvalidIssue) {
if (!issues.length) {
console.log("No issues or tickets found");
} else if (foundInvalidIssue) {
process.exit(1);
}

0 comments on commit f61d1b9

Please sign in to comment.