Skip to content

Commit 7ff117d

Browse files
committed
Address formatting issues
1 parent 060c11b commit 7ff117d

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

src/config-utils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -881,11 +881,13 @@ function parseRegistries(
881881
}
882882
}
883883

884-
export function parseRegistriesWithoutCredentials(registriesInput?: string) : RegistryConfigNoCredentials[] | undefined {
884+
export function parseRegistriesWithoutCredentials(
885+
registriesInput?: string,
886+
): RegistryConfigNoCredentials[] | undefined {
885887
return parseRegistries(registriesInput)?.map((r) => {
886-
const {token:_, ...registryWithoutCredentials} = r;
888+
const { token: _, ...registryWithoutCredentials } = r;
887889
return registryWithoutCredentials;
888-
})
890+
});
889891
}
890892

891893
function isLocal(configPath: string): boolean {

src/init-action.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ interface InitWithConfigStatusReport extends InitStatusReport {
9393
trap_cache_download_size_bytes: number;
9494
/** Time taken to download TRAP caches, in milliseconds. */
9595
trap_cache_download_duration_ms: number;
96-
/** Stringified JSON array of registry configuration objects, from the 'registries' config field or workflow input. **/
96+
/** Stringified JSON array of registry configuration objects, from the 'registries' config field
97+
or workflow input. **/
9798
registries: string;
9899
/** Stringified JSON object representing a query-filters, from the 'query-filters' config field. **/
99100
query_filters: string;
@@ -181,8 +182,10 @@ async function sendCompletedStatusReport(
181182
}
182183

183184
let packs: Record<string, string[]> = {};
184-
if ((config.augmentationProperties.packsInputCombines || !config.augmentationProperties.packsInput)
185-
&& config.originalUserInput.packs
185+
if (
186+
(config.augmentationProperties.packsInputCombines ||
187+
!config.augmentationProperties.packsInput) &&
188+
config.originalUserInput.packs
186189
) {
187190
// If it is an array, then assume there is only a single language being analyzed.
188191
if (Array.isArray(config.originalUserInput.packs)) {
@@ -194,7 +197,9 @@ async function sendCompletedStatusReport(
194197

195198
if (config.augmentationProperties.packsInput) {
196199
packs[config.languages[0]] ??= [];
197-
packs[config.languages[0]].push(...config.augmentationProperties.packsInput);
200+
packs[config.languages[0]].push(
201+
...config.augmentationProperties.packsInput,
202+
);
198203
}
199204

200205
// Append fields that are dependent on `config`
@@ -211,7 +216,11 @@ async function sendCompletedStatusReport(
211216
),
212217
trap_cache_download_duration_ms: Math.round(config.trapCacheDownloadTime),
213218
query_filters: JSON.stringify(config.originalUserInput["query-filters"]),
214-
registries: JSON.stringify(configUtils.parseRegistriesWithoutCredentials(getOptionalInput("registries"))),
219+
registries: JSON.stringify(
220+
configUtils.parseRegistriesWithoutCredentials(
221+
getOptionalInput("registries"),
222+
),
223+
),
215224
};
216225
await sendStatusReport({
217226
...initWithConfigStatusReport,

0 commit comments

Comments
 (0)