From 8d809e90afa7256744ed600a78cdc04804c4847a Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Thu, 27 Mar 2025 17:17:01 -0400 Subject: [PATCH 1/2] ci: replace `OCTOKITBOT_PROJECT_ACTION_TOKEN` and `OCTOKITBOT_PAT` with a token from https://github.com/apps/octokit --- .github/workflows/add_to_octokit_project.yml | 8 +++++++- .github/workflows/immediate-response.yml | 6 ++++++ .github/workflows/prettier.yml | 2 +- .github/workflows/release.yml | 8 +++++++- .github/workflows/update-prettier.yml | 9 +++++++-- .github/workflows/update.yml | 11 ++++++++--- test.ts | 0 7 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 test.ts diff --git a/.github/workflows/add_to_octokit_project.yml b/.github/workflows/add_to_octokit_project.yml index 8621996e4..2b296ab50 100644 --- a/.github/workflows/add_to_octokit_project.yml +++ b/.github/workflows/add_to_octokit_project.yml @@ -12,9 +12,15 @@ jobs: runs-on: ubuntu-latest continue-on-error: true steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.OCTOKIT_APP_ID }} + private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }} + owner: octokit - uses: actions/add-to-project@v1.0.2 with: project-url: https://github.com/orgs/octokit/projects/10 - github-token: ${{ secrets.OCTOKITBOT_PROJECT_ACTION_TOKEN }} + github-token: ${{ steps.app-token.outputs.token }} labeled: "Status: Stale" label-operator: NOT diff --git a/.github/workflows/immediate-response.yml b/.github/workflows/immediate-response.yml index 8a29b200f..8e59511c9 100644 --- a/.github/workflows/immediate-response.yml +++ b/.github/workflows/immediate-response.yml @@ -14,6 +14,11 @@ jobs: if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' && github.actor != 'githubactions[bot]' && github.actor != 'octokitbot' }} runs-on: ubuntu-latest steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.OCTOKIT_APP_ID }} + private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }} - name: Determine issue or PR number id: extract run: echo "NUMBER=${{ github.event.issue.number || github.event.pull_request.number }}" >> "$GITHUB_OUTPUT" @@ -27,3 +32,4 @@ jobs: We have a [process in place](https://github.com/octokit/.github/blob/main/community/prioritization_response.md#overview) for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with `Status: Up for grabs`. You & others like you are the reason all of this works! So thank you & happy coding! 🚀 + token: ${{ steps.app-token.outputs.token }} diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 0c2ddeb03..d5695faac 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: lts/* cache: npm - run: npm ci - run: npm run lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd4838f4e..cae0a169a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,12 @@ jobs: name: release runs-on: ubuntu-latest steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.OCTOKIT_APP_ID }} + private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }} + owner: octokit # Needed to be able to close issues in other repositories - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: @@ -26,5 +32,5 @@ jobs: - run: npm ci - run: npx semantic-release --debug env: - GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }} + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} NPM_TOKEN: ${{ secrets.OCTOKITBOT_NPM_TOKEN }} diff --git a/.github/workflows/update-prettier.yml b/.github/workflows/update-prettier.yml index e724eb05c..425231a21 100644 --- a/.github/workflows/update-prettier.yml +++ b/.github/workflows/update-prettier.yml @@ -7,16 +7,21 @@ jobs: update_prettier: runs-on: ubuntu-latest steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.OCTOKIT_APP_ID }} + private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }} - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: lts/* cache: npm - run: npm ci - run: npm run lint:fix - uses: gr2m/create-or-update-pull-request-action@v1.x env: - GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }} + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} with: title: Prettier updated body: An update to prettier required updates to your code. diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 747b1abb9..6c7244eb4 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -18,11 +18,16 @@ jobs: github.event_name == 'workflow_dispatch' || github.event.client_payload.action == 'published' steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.OCTOKIT_APP_ID }} + private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }} - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: cache: npm - node-version: 18 + node-version: lts/* - run: npm ci - run: >- echo "OCTOKIT_OPENAPI_VERSION=${{ @@ -47,7 +52,7 @@ jobs: if: github.event_name != 'push' uses: gr2m/create-or-update-pull-request-action@v1.x env: - GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }} + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} with: title: 🚧 OpenAPI types changed body: > @@ -79,7 +84,7 @@ jobs: if: github.event_name == 'push' uses: gr2m/create-or-update-pull-request-action@v1.x env: - GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }} + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} with: title: 🚧 OpenAPI types changed body: > diff --git a/test.ts b/test.ts new file mode 100644 index 000000000..e69de29bb From 86150330cd043308f01fb5adc3878cb76dbaecb4 Mon Sep 17 00:00:00 2001 From: wolfy1339 <4595477+wolfy1339@users.noreply.github.com> Date: Thu, 27 Mar 2025 17:30:44 -0400 Subject: [PATCH 2/2] Delete test.ts --- test.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test.ts diff --git a/test.ts b/test.ts deleted file mode 100644 index e69de29bb..000000000