Skip to content

Commit

Permalink
less logs
Browse files Browse the repository at this point in the history
  • Loading branch information
natlibfi-jonollil committed Nov 15, 2024
1 parent 5a589f0 commit e60ddf5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/routes/webhookRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ export default function (openshiftWebhookUrl, urlWhiteList) { // eslint-disable-
logger.debug('webhookRoute/handleHook');
const {project, buildConfig, id} = req.params;
const data = req.body;
logger.debug('data: ', data);

if (repository in data && branch in data) {

Check failure on line 22 in src/routes/webhookRoute.js

View workflow job for this annotation

GitHub Actions / Node version matrix (18.x)

'repository' is not defined

Check failure on line 22 in src/routes/webhookRoute.js

View workflow job for this annotation

GitHub Actions / Node version matrix (18.x)

'branch' is not defined

Check failure on line 22 in src/routes/webhookRoute.js

View workflow job for this annotation

GitHub Actions / Node version matrix (18.x)

Incomplete branch, every branch in a conditional statement must contain a return statement

Check failure on line 22 in src/routes/webhookRoute.js

View workflow job for this annotation

GitHub Actions / Node version matrix (22.x)

'repository' is not defined

Check failure on line 22 in src/routes/webhookRoute.js

View workflow job for this annotation

GitHub Actions / Node version matrix (22.x)

'branch' is not defined

Check failure on line 22 in src/routes/webhookRoute.js

View workflow job for this annotation

GitHub Actions / Node version matrix (22.x)

Incomplete branch, every branch in a conditional statement must contain a return statement
logger.debug('Repository: ', data.repository);
logger.debug('Branch: ', data.branch);
}

const triggerUrl = `${openshiftWebhookUrl}/${project}/buildconfigs/${buildConfig}/webhooks/${id}/generic`;
fetch(
triggerUrl,
Expand All @@ -41,7 +46,6 @@ export default function (openshiftWebhookUrl, urlWhiteList) { // eslint-disable-
}

const data = req.body;
logger.debug('data: ', data);

fetch(
triggerUrl,
Expand Down

0 comments on commit e60ddf5

Please sign in to comment.