Skip to content

Commit 85df592

Browse files
style: fix yarn format issues
1 parent 2d5991f commit 85df592

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

lambdas/functions/webhook/src/ConfigLoader.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,10 @@ describe('ConfigLoader Tests', () => {
173173
process.env.PARAMETER_RUNNER_MATCHER_CONFIG_PATH = '/path/to/matcher/config-1:/path/to/matcher/config-2';
174174
process.env.PARAMETER_GITHUB_APP_WEBHOOK_SECRET = '/path/to/webhook/secret';
175175

176-
const partialMatcher1 = '[{"id":"1","arn":"arn:aws:sqs:queue1","matcherConfig":{"labelMatchers":[["a"]],"exactMatch":true}}';
177-
const partialMatcher2 = ',{"id":"2","arn":"arn:aws:sqs:queue2","matcherConfig":{"labelMatchers":[["b"]],"exactMatch":true}}]';
176+
const partialMatcher1 =
177+
'[{"id":"1","arn":"arn:aws:sqs:queue1","matcherConfig":{"labelMatchers":[["a"]],"exactMatch":true}}';
178+
const partialMatcher2 =
179+
',{"id":"2","arn":"arn:aws:sqs:queue2","matcherConfig":{"labelMatchers":[["b"]],"exactMatch":true}}]';
178180

179181
const combinedMatcherConfig = [
180182
{ id: '1', arn: 'arn:aws:sqs:queue1', matcherConfig: { labelMatchers: [['a']], exactMatch: true } },
@@ -258,8 +260,10 @@ describe('ConfigLoader Tests', () => {
258260
process.env.REPOSITORY_ALLOW_LIST = '["repo1", "repo2"]';
259261
process.env.PARAMETER_RUNNER_MATCHER_CONFIG_PATH = '/path/to/matcher/config-1:/path/to/matcher/config-2';
260262

261-
const partial1 = '[{"id":"1","arn":"arn:aws:sqs:queue1","matcherConfig":{"labelMatchers":[["x"]],"exactMatch":true}}';
262-
const partial2 = ',{"id":"2","arn":"arn:aws:sqs:queue2","matcherConfig":{"labelMatchers":[["y"]],"exactMatch":true}}]';
263+
const partial1 =
264+
'[{"id":"1","arn":"arn:aws:sqs:queue1","matcherConfig":{"labelMatchers":[["x"]],"exactMatch":true}}';
265+
const partial2 =
266+
',{"id":"2","arn":"arn:aws:sqs:queue2","matcherConfig":{"labelMatchers":[["y"]],"exactMatch":true}}]';
263267

264268
const combined: RunnerMatcherConfig[] = [
265269
{ id: '1', arn: 'arn:aws:sqs:queue1', matcherConfig: { labelMatchers: [['x']], exactMatch: true } },

lambdas/functions/webhook/src/ConfigLoader.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ abstract class MatcherAwareConfig extends BaseConfig {
9393
protected async loadMatcherConfig(paramPathsEnv: string | undefined) {
9494
if (!paramPathsEnv) return;
9595

96-
const paths = paramPathsEnv.split(':').map(p => p.trim()).filter(Boolean);
96+
const paths = paramPathsEnv
97+
.split(':')
98+
.map((p) => p.trim())
99+
.filter(Boolean);
97100
let combinedString = '';
98101

99102
for (const path of paths) {
@@ -112,7 +115,6 @@ abstract class MatcherAwareConfig extends BaseConfig {
112115
}
113116
}
114117

115-
116118
export class ConfigWebhook extends MatcherAwareConfig {
117119
repositoryAllowList: string[] = [];
118120
webhookSecret: string = '';

0 commit comments

Comments
 (0)