Skip to content

Commit c90e1da

Browse files
authored
Merge pull request #70 from kernel/fix/use-admin-app-token
fix: use kernel-internal app token in update-cli-coverage workflow
2 parents 51b4652 + f717f2d commit c90e1da

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/update-cli-coverage.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,19 @@ jobs:
2020
update-cli-coverage:
2121
runs-on: ubuntu-latest
2222
steps:
23+
- name: Generate app token
24+
id: app-token
25+
uses: actions/create-github-app-token@v1
26+
with:
27+
app-id: ${{ secrets.ADMIN_APP_ID }}
28+
private-key: ${{ secrets.ADMIN_APP_PRIVATE_KEY }}
29+
owner: kernel
30+
2331
- name: Get PR info for manual dispatch
2432
id: pr-info
2533
if: github.event_name == 'workflow_dispatch'
2634
env:
27-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
35+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
2836
run: |
2937
if [ -n "${{ inputs.pr_number }}" ]; then
3038
# Use provided PR number
@@ -71,8 +79,8 @@ jobs:
7179
7280
- name: Configure git identity
7381
run: |
74-
git config --global user.name "Cursor Agent"
75-
git config --global user.email "cursor-agent@kernel.sh"
82+
git config --global user.name "kernel-internal[bot]"
83+
git config --global user.email "260533166+kernel-internal[bot]@users.noreply.github.com"
7684
7785
- name: Setup Go
7886
uses: actions/setup-go@v6
@@ -81,13 +89,13 @@ jobs:
8189

8290
- name: Clone API repo
8391
env:
84-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
92+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
8593
run: |
8694
gh repo clone kernel/kernel /tmp/kernel-api -- --depth=1
8795
8896
- name: Clone CLI repo and checkout existing branch
8997
env:
90-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
98+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
9199
run: |
92100
gh repo clone kernel/cli /tmp/kernel-cli
93101
cd /tmp/kernel-cli
@@ -132,7 +140,7 @@ jobs:
132140
- name: Update CLI coverage
133141
env:
134142
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
135-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
143+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
136144
BRANCH_PREFIX: cli-coverage-update
137145
run: |
138146
cursor-agent -p "You are a CLI updater that implements missing CLI commands based on SDK updates.

0 commit comments

Comments
 (0)