Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 7de8392

Browse files
jablkoelibarzilay
andauthored
Apply suggestions from code review
Co-authored-by: Eli Barzilay <[email protected]>
1 parent 87a49f7 commit 7de8392

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/compute-pr-actions.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,8 @@ export function process(prInfo: PrInfo | BotEnsureRemovedFromProject | BotNoPack
309309
post({ tag: "welcome", status: createWelcomeComment(info) });
310310

311311
// Propagate suggestions into actions
312-
for (const pkg of info.pkgInfo) {
313-
for (const file of pkg.files) {
314-
if (file.suggestion) {
315-
context.suggestions[file.path] = file.suggestion;
316-
}
317-
}
318-
}
312+
info.pkgInfo.forEach(pkg => pkg.files.forEach(file =>
313+
file.suggestion && context.suggestions[file.path] = file.suggestion));
319314

320315
// Ping reviewers when needed
321316
if (!(info.hasChangereqs || info.approvedBy.includes("owner") || info.approvedBy.includes("maintainer"))) {

0 commit comments

Comments
 (0)