Skip to content

Commit

Permalink
Merge pull request #5 from hellofresh/fix-filtering-condition
Browse files Browse the repository at this point in the history
Fix job filtering condition
  • Loading branch information
raghavtan authored Mar 23, 2022
2 parents a6bde50 + 65d67fe commit 8468f2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/index.js

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

4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const main = async () => {
// it impossible to properly match to jobs returned from the API.
// Since we later match to only failed jobs, it's not a problem for now.
const filteredJobs = response.data.jobs.filter(
(job) => (job.status == 'completed' && !ignoreJobsRegex ||
!job.name.match(ignoreJobsRegex)),
(job) => (job.status == 'completed' && (!ignoreJobsRegex ||
!job.name.match(ignoreJobsRegex))),
);
const failure = filteredJobs.some((job) => job.conclusion == 'failure');

Expand Down

0 comments on commit 8468f2e

Please sign in to comment.