Skip to content

Commit e1e700e

Browse files
committed
yarn format
1 parent a8d3e0f commit e1e700e

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

lambdas/functions/ami-housekeeper/src/ami.test.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ import {
77
EC2Client,
88
Image,
99
} from '@aws-sdk/client-ec2';
10-
import {
11-
DescribeParametersCommand,
12-
DescribeParametersCommandOutput,
13-
SSMClient,
14-
} from '@aws-sdk/client-ssm';
10+
import { DescribeParametersCommand, DescribeParametersCommandOutput, SSMClient } from '@aws-sdk/client-ssm';
1511
import { getParameters } from '@aws-github-runner/aws-ssm-util';
1612
import { mockClient } from 'aws-sdk-client-mock';
1713
import 'aws-sdk-client-mock-jest/vitest';
@@ -471,9 +467,7 @@ describe("delete AMI's", () => {
471467
],
472468
});
473469

474-
vi.mocked(getParameters).mockResolvedValue(
475-
new Map([['/github-runner/config/ami_id', 'ami-underscore0001']]),
476-
);
470+
vi.mocked(getParameters).mockResolvedValue(new Map([['/github-runner/config/ami_id', 'ami-underscore0001']]));
477471

478472
await amiCleanup({
479473
minimumDaysOld: 0,
@@ -497,9 +491,7 @@ describe("delete AMI's", () => {
497491
],
498492
});
499493

500-
vi.mocked(getParameters).mockResolvedValue(
501-
new Map([['/github-runner/config/ami-id', 'ami-hyphen0001']]),
502-
);
494+
vi.mocked(getParameters).mockResolvedValue(new Map([['/github-runner/config/ami-id', 'ami-hyphen0001']]));
503495

504496
await amiCleanup({
505497
minimumDaysOld: 0,
@@ -533,9 +525,7 @@ describe("delete AMI's", () => {
533525
],
534526
});
535527

536-
vi.mocked(getParameters).mockResolvedValue(
537-
new Map([['/some/path/ami-id', 'ami-wildcard0001']]),
538-
);
528+
vi.mocked(getParameters).mockResolvedValue(new Map([['/some/path/ami-id', 'ami-wildcard0001']]));
539529

540530
await amiCleanup({
541531
minimumDaysOld: 0,

lambdas/functions/ami-housekeeper/src/ami.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,7 @@ async function resolveSsmParameterValues(names: string[]): Promise<(string | und
203203
// Log warnings for parameters that couldn't be resolved
204204
for (const name of names) {
205205
if (!parameterMap.has(name)) {
206-
logger.warn(
207-
`Failed to resolve image id from SSM parameter ${name}: Parameter not found or access denied`,
208-
);
206+
logger.warn(`Failed to resolve image id from SSM parameter ${name}: Parameter not found or access denied`);
209207
}
210208
}
211209

lambdas/functions/control-plane/src/github/auth.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ async function createAuth(installationId: number | undefined, ghesApiUrl: string
116116
// replace literal \n characters with new lines to allow the key to be stored as a
117117
// single line variable. This logic should match how the GitHub Terraform provider
118118
// processes private keys to retain compatibility between the projects
119-
const privateKey = Buffer.from(privateKeyBase64, 'base64')
120-
.toString()
121-
.replace('/[\\n]/g', String.fromCharCode(10));
119+
const privateKey = Buffer.from(privateKeyBase64, 'base64').toString().replace('/[\\n]/g', String.fromCharCode(10));
122120

123121
// Use a custom createJwt callback to include a jti (JWT ID) claim in every token.
124122
// Without this, concurrent Lambda invocations generating JWTs within the same second

0 commit comments

Comments
 (0)