diff --git a/.github/workflows/github-minimum-intelligence-agent.yml b/.github/workflows/github-minimum-intelligence-agent.yml index 2450282..5654e51 100644 --- a/.github/workflows/github-minimum-intelligence-agent.yml +++ b/.github/workflows/github-minimum-intelligence-agent.yml @@ -22,17 +22,10 @@ jobs: (github.event_name == 'issues') || (github.event_name == 'issue_comment' && !endsWith(github.event.comment.user.login, '[bot]')) steps: - - name: Generate GitHub App token - id: app-token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ secrets.APP_ID }} - private-key: ${{ secrets.APP_PRIVATE_KEY }} - - name: Authorize id: authorize env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | PERM=$(gh api "repos/${{ github.repository }}/collaborators/${{ github.actor }}/permission" --jq '.permission' 2>/dev/null || echo "none") echo "Actor: ${{ github.actor }}, Permission: $PERM" @@ -44,7 +37,7 @@ jobs: - name: Reject if: ${{ failure() && steps.authorize.outcome == 'failure' }} env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | if [[ "${{ github.event_name }}" == "issue_comment" ]]; then gh api "repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions" -f content=-1 @@ -57,7 +50,6 @@ jobs: with: ref: ${{ github.event.repository.default_branch }} fetch-depth: 0 - token: ${{ steps.app-token.outputs.token }} - name: Setup Bun uses: oven-sh/setup-bun@v2 @@ -66,7 +58,7 @@ jobs: - name: Preinstall env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: bun .github-minimum-intelligence/lifecycle/indicator.ts - name: Install dependencies @@ -81,5 +73,5 @@ jobs: OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: bun .github-minimum-intelligence/lifecycle/agent.ts diff --git a/.github/workflows/github-minimum-intelligence-installation.yml b/.github/workflows/github-minimum-intelligence-installation.yml index 948d2d6..cf9557d 100644 --- a/.github/workflows/github-minimum-intelligence-installation.yml +++ b/.github/workflows/github-minimum-intelligence-installation.yml @@ -13,16 +13,9 @@ jobs: welcome: runs-on: ubuntu-latest steps: - - name: Generate GitHub App token - id: app-token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ secrets.APP_ID }} - private-key: ${{ secrets.APP_PRIVATE_KEY }} - - name: Log installation env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | echo "GitHub Minimum Intelligence installed." echo "Installation ID: ${{ github.event.installation.id }}" @@ -30,7 +23,7 @@ jobs: - name: Post welcome issue to new repos env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | # Determine which repos were just added if [ "${{ github.event_name }}" = "installation" ]; then