Skip to content

Commit 8f360a8

Browse files
author
gidoichi
committed
use Promise.all
1 parent 8ed6846 commit 8f360a8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/generateCommitMessageFromGitDiff.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,7 @@ export const generateCommitMessageByDiff = async (
166166
context
167167
);
168168

169-
const commitMessages = [] as string[];
170-
for (const promise of commitMessagePromises) {
171-
commitMessages.push((await promise) as string);
172-
await delay(2000);
173-
}
169+
const commitMessages = await Promise.all(commitMessagePromises);
174170

175171
return commitMessages.join('\n\n');
176172
}

0 commit comments

Comments
 (0)