Skip to content

Commit d332aa9

Browse files
committed
Use computedConfig for pack telemetry
1 parent 7f81363 commit d332aa9

File tree

2 files changed

+8
-38
lines changed

2 files changed

+8
-38
lines changed

lib/init-action.js

Lines changed: 4 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/init-action.ts

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ import {
7575
ConfigurationError,
7676
wrapError,
7777
checkActionVersion,
78-
cloneObject,
7978
getErrorMessage,
8079
} from "./util";
8180
import { validateWorkflow } from "./workflow";
@@ -206,28 +205,10 @@ async function sendCompletedStatusReport(
206205
}
207206

208207
let packs: Record<string, string[]> = {};
209-
if (
210-
(config.augmentationProperties.packsInputCombines ||
211-
!config.augmentationProperties.packsInput) &&
212-
config.originalUserInput.packs
213-
) {
214-
// Make a copy, because we might modify `packs`.
215-
const copyPacksFromOriginalUserInput = cloneObject(
216-
config.originalUserInput.packs,
217-
);
218-
// If it is an array, then assume there is only a single language being analyzed.
219-
if (Array.isArray(copyPacksFromOriginalUserInput)) {
220-
packs[config.languages[0]] = copyPacksFromOriginalUserInput;
221-
} else {
222-
packs = copyPacksFromOriginalUserInput;
223-
}
224-
}
225-
226-
if (config.augmentationProperties.packsInput) {
227-
packs[config.languages[0]] ??= [];
228-
packs[config.languages[0]].push(
229-
...config.augmentationProperties.packsInput,
230-
);
208+
if (Array.isArray(config.computedConfig.packs)) {
209+
packs[config.languages[0]] = config.computedConfig.packs;
210+
} else if (config.computedConfig.packs !== undefined) {
211+
packs = config.computedConfig.packs;
231212
}
232213

233214
// Append fields that are dependent on `config`

0 commit comments

Comments
 (0)