Skip to content

Commit 4dba215

Browse files
Replace GitHub App token with built-in GITHUB_TOKEN in workflow files
- Remove actions/create-github-app-token@v1 step from both workflows - Replace ${{ steps.app-token.outputs.token }} with ${{ secrets.GITHUB_TOKEN }} - Remove token: parameter from checkout step Co-authored-by: japertechnology <51429990+japertechnology@users.noreply.github.com>
1 parent 5a2c76d commit 4dba215

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

.github/workflows/github-minimum-intelligence-agent.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,10 @@ jobs:
2222
(github.event_name == 'issues')
2323
|| (github.event_name == 'issue_comment' && !endsWith(github.event.comment.user.login, '[bot]'))
2424
steps:
25-
- name: Generate GitHub App token
26-
id: app-token
27-
uses: actions/create-github-app-token@v1
28-
with:
29-
app-id: ${{ secrets.APP_ID }}
30-
private-key: ${{ secrets.APP_PRIVATE_KEY }}
31-
3225
- name: Authorize
3326
id: authorize
3427
env:
35-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3629
run: |
3730
PERM=$(gh api "repos/${{ github.repository }}/collaborators/${{ github.actor }}/permission" --jq '.permission' 2>/dev/null || echo "none")
3831
echo "Actor: ${{ github.actor }}, Permission: $PERM"
@@ -44,7 +37,7 @@ jobs:
4437
- name: Reject
4538
if: ${{ failure() && steps.authorize.outcome == 'failure' }}
4639
env:
47-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4841
run: |
4942
if [[ "${{ github.event_name }}" == "issue_comment" ]]; then
5043
gh api "repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions" -f content=-1
@@ -57,7 +50,6 @@ jobs:
5750
with:
5851
ref: ${{ github.event.repository.default_branch }}
5952
fetch-depth: 0
60-
token: ${{ steps.app-token.outputs.token }}
6153

6254
- name: Setup Bun
6355
uses: oven-sh/setup-bun@v2
@@ -66,7 +58,7 @@ jobs:
6658

6759
- name: Preinstall
6860
env:
69-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7062
run: bun .github-minimum-intelligence/lifecycle/indicator.ts
7163

7264
- name: Install dependencies
@@ -81,5 +73,5 @@ jobs:
8173
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
8274
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
8375
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
84-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8577
run: bun .github-minimum-intelligence/lifecycle/agent.ts

.github/workflows/github-minimum-intelligence-installation.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,17 @@ jobs:
1313
welcome:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: Generate GitHub App token
17-
id: app-token
18-
uses: actions/create-github-app-token@v1
19-
with:
20-
app-id: ${{ secrets.APP_ID }}
21-
private-key: ${{ secrets.APP_PRIVATE_KEY }}
22-
2316
- name: Log installation
2417
env:
25-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2619
run: |
2720
echo "GitHub Minimum Intelligence installed."
2821
echo "Installation ID: ${{ github.event.installation.id }}"
2922
echo "Installed by: ${{ github.event.installation.account.login }}"
3023
3124
- name: Post welcome issue to new repos
3225
env:
33-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3427
run: |
3528
# Determine which repos were just added
3629
if [ "${{ github.event_name }}" = "installation" ]; then

0 commit comments

Comments
 (0)