Skip to content

Commit 535a923

Browse files
committed
fix(sisyphus): use GitHub API to add labels to release PR
gh pr edit fails with GITHUB_TOKEN in Actions. The issues API endpoint works with standard token permissions.
1 parent e0bc75d commit 535a923

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/sisyphus/src/providers/GitHubProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ export class GitHubProvider extends GitProvider {
7676
}
7777

7878
private async addLabels(prNumber: number, labels: string[]) {
79-
const labelArgs = labels.flatMap((l) => ["--add-label", l]);
80-
await Bun.$`gh pr edit ${prNumber} ${labelArgs}`;
79+
const labelArgs = labels.flatMap((l) => ["-f", `labels[]=${l}`]);
80+
await Bun.$`gh api repos/${this.owner}/${this.repo}/issues/${prNumber}/labels --method POST ${labelArgs}`.quiet();
8181
}
8282

8383
async updatePr(number: number, options: UpdatePrOptions): Promise<void> {

0 commit comments

Comments
 (0)