Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Octokit } from '@octokit/rest';

Check notice on line 1 in lambdas/functions/control-plane/src/scale-runners/scale-up.ts

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

ℹ Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 4.47 to 4.53, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
import { addPersistentContextToChildLogger, createChildLogger } from '@aws-github-runner/aws-powertools-util';
import { getParameter, putParameter } from '@aws-github-runner/aws-ssm-util';
import yn from 'yn';
Expand Down Expand Up @@ -148,6 +148,12 @@
});
metricGitHubAppRateLimit(jobForWorkflowRun.headers);
isQueued = jobForWorkflowRun.data.status === 'queued';
if (!isQueued) {
logger.info(`Job ${payload.id} is not queued`);
}
else {
logger.info(`Job ${payload.id} is queued`);
}
} else {
throw Error(`Event ${payload.eventType} is not supported`);
}
Expand Down
Loading