Skip to content

Commit

Permalink
error handling for release-labels
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jul 3, 2024
1 parent 239a532 commit 3e02705
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,16 @@ export default function getCLI(context) {
for (const { prId, labels } of prsTargetLabel) {
// Running sequentially to avoid rate limiting
// eslint-disable-next-line no-await-in-loop
await github.syncLabels({
labels,
existingLabels: prIdLabelMap.get(prId).map((l) => l.name),
prId,
...opts,
});
try {
await github.syncLabels({

Check failure on line 135 in src/cli.js

View workflow job for this annotation

GitHub Actions / build

Unexpected `await` inside a loop
labels,
existingLabels: prIdLabelMap.get(prId).map((l) => l.name),
prId,
...opts,
});
} catch (error) {
console.error(`Failed to sync labels for PR ID ${prId}:`, error);
}
}
});

Expand Down

0 comments on commit 3e02705

Please sign in to comment.