Skip to content

Commit

Permalink
fix: set PR labels serially (#2122)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys authored Nov 8, 2023
1 parent 4b9ca2f commit bf58911
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1200,21 +1200,20 @@ export class Manifest {
) {
// we've either tagged all releases or they were duplicates:
// adjust tags on pullRequest
await Promise.all([
this.github.removeIssueLabels(this.labels, pullRequest.number),
this.github.addIssueLabels(this.releaseLabels, pullRequest.number),
]);
await this.github.removeIssueLabels(this.labels, pullRequest.number);
await this.github.addIssueLabels(
this.releaseLabels,
pullRequest.number
);
}
if (githubReleases.length === 0) {
// If all releases were duplicate, throw a duplicate error
throw duplicateReleases[0];
}
} else {
// adjust tags on pullRequest
await Promise.all([
this.github.removeIssueLabels(this.labels, pullRequest.number),
this.github.addIssueLabels(this.releaseLabels, pullRequest.number),
]);
await this.github.removeIssueLabels(this.labels, pullRequest.number);
await this.github.addIssueLabels(this.releaseLabels, pullRequest.number);
}

return githubReleases;
Expand Down

0 comments on commit bf58911

Please sign in to comment.