Skip to content

Commit

Permalink
Add a try block to the label sync script
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr committed Sep 30, 2024
1 parent ac91ffa commit 392921d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/actions/sync-labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ async function main() {
process.chdir(opts.dir);
}

const merged = await readAndMergeLabels(opts.labels, accessToken);
await syncLabels(merged, repo, accessToken, opts.delete, opts.wet);
try {
const merged = await readAndMergeLabels(opts.labels, accessToken);
await syncLabels(merged, repo, accessToken, opts.delete, opts.wet);
} catch (e) {
console.error("Error syncing labels", e);
process.exit(1);
}
}

async function readAndMergeLabels(srcs: string[], accessToken: string): Promise<Map<string, LabelInfo>> {
Expand Down

0 comments on commit 392921d

Please sign in to comment.