File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
lambdas/functions/control-plane/src/pool Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ interface RunnerStatus {
27
27
function canRunJob ( workflowJobLabels : string [ ] , runnerLabels : string [ ] ) : boolean {
28
28
runnerLabels = runnerLabels . map ( ( label ) => label . toLowerCase ( ) ) ;
29
29
const matchLabels = workflowJobLabels . every ( ( wl ) => runnerLabels . includes ( wl . toLowerCase ( ) ) ) ;
30
- const match = workflowJobLabels . length === 0 ? ! matchLabels : matchLabels ;
31
- return match ;
30
+ return workflowJobLabels . length !== 0 && matchLabels ;
32
31
}
33
32
34
33
export async function adjust ( event : PoolEvent ) : Promise < void > {
@@ -52,9 +51,7 @@ export async function adjust(event: PoolEvent): Promise<void> {
52
51
const runnerOwners = process . env . RUNNER_OWNERS . split ( ',' ) ;
53
52
const amiIdSsmParameterName = process . env . AMI_ID_SSM_PARAMETER_NAME ;
54
53
const tracingEnabled = yn ( process . env . POWERTOOLS_TRACE_ENABLED , { default : false } ) ;
55
- const onDemandFailoverOnError = process . env . ENABLE_ON_DEMAND_FAILOVER_FOR_ERRORS
56
- ? ( JSON . parse ( process . env . ENABLE_ON_DEMAND_FAILOVER_FOR_ERRORS ) as [ string ] )
57
- : [ ] ;
54
+ const onDemandFailoverOnError : string [ ] = JSON . parse ( process . env . ENABLE_ON_DEMAND_FAILOVER_FOR_ERRORS ?? '[]' ) ;
58
55
59
56
const { ghesApiUrl, ghesBaseUrl } = getGitHubEnterpriseApiUrl ( ) ;
60
57
You can’t perform that action at this time.
0 commit comments