Skip to content

Commit 46547ab

Browse files
authored
fix: update ai-policy workflow from org templates (#255)
Signed-off-by: kyteinsky <kyteinsky@gmail.com>
1 parent 9b0ecd1 commit 46547ab

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/ai-policy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Collect PR commit messages
3333
id: collect
3434
env:
35-
GH_TOKEN: ${{ github.token }}
35+
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
3636
COMMITS_URL: ${{ github.event.pull_request.commits_url }}
3737
run: |
3838
set -euo pipefail
@@ -125,7 +125,7 @@ jobs:
125125
- name: Create 'AI assisted' label if absent
126126
if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true'
127127
env:
128-
GH_TOKEN: ${{ github.token }}
128+
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
129129
run: |
130130
gh api "repos/${{ github.repository }}/labels" \
131131
--method POST \
@@ -137,11 +137,11 @@ jobs:
137137
- name: Label PR as AI assisted
138138
if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true'
139139
env:
140-
GH_TOKEN: ${{ github.token }}
140+
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
141141
run: |
142-
gh pr edit "${{ github.event.pull_request.number }}" \
143-
--repo "${{ github.repository }}" \
144-
--add-label "AI assisted"
142+
gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" \
143+
--method POST \
144+
-f "labels[]=AI assisted"
145145
echo "Added 'AI assisted' label to PR #${{ github.event.pull_request.number }}"
146146
147147
- name: Fail on coding-agent Signed-off-by

0 commit comments

Comments
 (0)