From 131248040cf5b0fc6fb50bfb2531dfc45f707058 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 16 Apr 2026 14:30:03 +0000 Subject: [PATCH] fix: replace deprecated issues.update with issues.addLabels The GitHub REST API `PATCH /repos/{owner}/{repo}/issues/{issue_number}` endpoint used by `issues.update()` is deprecated. Replace it with `issues.addLabels()` which uses a non-deprecated POST endpoint. Also skip the API call entirely when there are no labels to add. https://claude.ai/code/session_01M2ZQJemqV5MDgj9pFeV1LM --- src/github-ops.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/github-ops.ts b/src/github-ops.ts index 9df74da..0a1cec9 100644 --- a/src/github-ops.ts +++ b/src/github-ops.ts @@ -98,12 +98,14 @@ export class GithubOps { throw new Error(`Falsy issue number`) } - await this.kit.issues.update({ - owner: r.owner, - repo: r.name, - issue_number: issueNumber, - labels: this.prLabels, - }) + if (this.prLabels.length > 0) { + await this.kit.issues.addLabels({ + owner: r.owner, + repo: r.name, + issue_number: issueNumber, + labels: this.prLabels, + }) + } return issueNumber }