Skip to content

Commit 02af9dc

Browse files
committed
Update dist files to reflect source changes
1 parent d9c3356 commit 02af9dc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

dist/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
196196
const owner = process.env.GITHUB_REPOSITORY_OWNER;
197197
const repo = (_a = process.env.GITHUB_REPOSITORY) === null || _a === void 0 ? void 0 : _a.split('/', 2)[1];
198198
const stackAidJson = { version: 1, dependencies: [] };
199-
const direct = [];
199+
let direct = [];
200200
const glob = '**/';
201201
const summary = yield (0, queries_1.getRepositorySummary)(owner, repo, glob);
202202
for (const { after, node } of summary) {
@@ -215,6 +215,7 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
215215
}
216216
// We need to query each direct dependency separately since the graphql API
217217
// does NOT support nested dependencies.
218+
direct = (0, lodash_1.uniqBy)(direct, (d) => d.repository.url);
218219
for (const dep of direct) {
219220
const { url: source, name, owner: { login: owner }, } = dep.repository;
220221
const summary = yield (0, queries_1.getRepositorySummary)(owner, name);
@@ -397,8 +398,8 @@ const getRepositorySummary = (owner, repo, glob = '') => __awaiter(void 0, void
397398
cursor = next !== cursor ? next : '';
398399
}
399400
const relevant = edges
400-
.filter((edge) => (0, utils_1.matches)(edge.node.filename, constants_1.SUMMARY_FILE_TYPES, glob))
401-
.map((edge, i) => (Object.assign(Object.assign({}, edge), { after: i > 0 ? edges[i - 1].cursor : undefined })));
401+
.map((edge, i) => (Object.assign(Object.assign({}, edge), { after: i > 0 ? edges[i - 1].cursor : undefined })))
402+
.filter((edge) => (0, utils_1.matches)(edge.node.filename, constants_1.SUMMARY_FILE_TYPES, glob));
402403
return relevant;
403404
});
404405
exports.getRepositorySummary = getRepositorySummary;

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)