Skip to content

Commit

Permalink
do not exit prematurely if errors or warnings are found
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudTT committed Sep 18, 2024
1 parent 432a8cc commit 7f056c8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/lint-and-license-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '16'

- name: Install dependencies
working-directory: app/frontend
Expand Down Expand Up @@ -56,15 +56,15 @@ jobs:
exit $exit_code
- name: Comment on PR with ESLint errors
if: github.event_name == 'pull_request' && env.HAS_ERRORS == 'true'
- name: Comment on PR with ESLint Errors
if: env.HAS_ERRORS == 'true'
uses: actions/github-script@v7
with:
script: |
const lintOutput = process.env.CLEAN_OUTPUT;
const issueNumber = context.issue.number || context.payload.pull_request.number;
const owner = context.repo.owner;
const repo = repo.repo;
const repo = context.repo.repo;
if (lintOutput) {
const commentBody = `## ESLint Errors:\n\`\`\`\n${lintOutput}\n\`\`\`\nPlease fix the errors mentioned above.`;
Expand All @@ -76,3 +76,7 @@ jobs:
});
} else {
console.log("No ESLint errors to report.");
- name: Fail if Errors Exist
if: env.HAS_ERRORS == 'true'
run: exit 1 # Fail the workflow if errors exist

0 comments on commit 7f056c8

Please sign in to comment.