From 7149300abb0ae0d3674d1cf1909a3c9c19f5207c Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Fri, 3 Jul 2026 00:51:18 +0200 Subject: [PATCH] ci: Add lables via rest api gh pr edit --add-label runs a GraphQL query that also fetches org/login fields requiring `read:org`, which COMMAND_BOT_PAT doesn't have. The REST labels endpoint only needs `public_repo`, matching the label-creation step already using REST above it. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Daniel Kesselberg --- .github/workflows/ai-policy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ai-policy.yml b/.github/workflows/ai-policy.yml index acc8d30b9bf1e..e5c8d7d6520c8 100644 --- a/.github/workflows/ai-policy.yml +++ b/.github/workflows/ai-policy.yml @@ -139,9 +139,9 @@ jobs: env: GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} run: | - gh pr edit "${{ github.event.pull_request.number }}" \ - --repo "${{ github.repository }}" \ - --add-label "AI assisted" + gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" \ + --method POST \ + -f "labels[]=AI assisted" echo "Added 'AI assisted' label to PR #${{ github.event.pull_request.number }}" - name: Fail on coding-agent Signed-off-by