Skip to content

Commit 2e190c8

Browse files
authored
ci: replace OCTOKITBOT_PROJECT_ACTION_TOKEN and OCTOKITBOT_PAT with a token from https://github.com/apps/octokit (#459)
* ci: replace `OCTOKITBOT_PROJECT_ACTION_TOKEN` and `OCTOKITBOT_PAT` with a token from https://github.com/apps/octokit * Delete test.ts
1 parent 76be93f commit 2e190c8

File tree

6 files changed

+36
-8
lines changed

6 files changed

+36
-8
lines changed

.github/workflows/add_to_octokit_project.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@ jobs:
1212
runs-on: ubuntu-latest
1313
continue-on-error: true
1414
steps:
15+
- uses: actions/create-github-app-token@v1
16+
id: app-token
17+
with:
18+
app-id: ${{ vars.OCTOKIT_APP_ID }}
19+
private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }}
20+
owner: octokit
1521
- uses: actions/[email protected]
1622
with:
1723
project-url: https://github.com/orgs/octokit/projects/10
18-
github-token: ${{ secrets.OCTOKITBOT_PROJECT_ACTION_TOKEN }}
24+
github-token: ${{ steps.app-token.outputs.token }}
1925
labeled: "Status: Stale"
2026
label-operator: NOT

.github/workflows/immediate-response.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ jobs:
1414
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' && github.actor != 'githubactions[bot]' && github.actor != 'octokitbot' }}
1515
runs-on: ubuntu-latest
1616
steps:
17+
- uses: actions/create-github-app-token@v1
18+
id: app-token
19+
with:
20+
app-id: ${{ vars.OCTOKIT_APP_ID }}
21+
private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }}
1722
- name: Determine issue or PR number
1823
id: extract
1924
run: echo "NUMBER=${{ github.event.issue.number || github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
@@ -27,3 +32,4 @@ jobs:
2732
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.
2833
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`.
2934
You & others like you are the reason all of this works! So thank you & happy coding! 🚀
35+
token: ${{ steps.app-token.outputs.token }}

.github/workflows/prettier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- uses: actions/setup-node@v4
1717
with:
18-
node-version: 18
18+
node-version: lts/*
1919
cache: npm
2020
- run: npm ci
2121
- run: npm run lint

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ jobs:
1818
name: release
1919
runs-on: ubuntu-latest
2020
steps:
21+
- uses: actions/create-github-app-token@v1
22+
id: app-token
23+
with:
24+
app-id: ${{ vars.OCTOKIT_APP_ID }}
25+
private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }}
26+
owner: octokit # Needed to be able to close issues in other repositories
2127
- uses: actions/checkout@v4
2228
- uses: actions/setup-node@v4
2329
with:
@@ -26,5 +32,5 @@ jobs:
2632
- run: npm ci
2733
- run: npx semantic-release --debug
2834
env:
29-
GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }}
35+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
3036
NPM_TOKEN: ${{ secrets.OCTOKITBOT_NPM_TOKEN }}

.github/workflows/update-prettier.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,21 @@ jobs:
77
update_prettier:
88
runs-on: ubuntu-latest
99
steps:
10+
- uses: actions/create-github-app-token@v1
11+
id: app-token
12+
with:
13+
app-id: ${{ vars.OCTOKIT_APP_ID }}
14+
private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }}
1015
- uses: actions/checkout@v4
1116
- uses: actions/setup-node@v4
1217
with:
13-
node-version: 18
18+
node-version: lts/*
1419
cache: npm
1520
- run: npm ci
1621
- run: npm run lint:fix
1722
- uses: gr2m/[email protected]
1823
env:
19-
GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }}
24+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
2025
with:
2126
title: Prettier updated
2227
body: An update to prettier required updates to your code.

.github/workflows/update.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ jobs:
1818
github.event_name == 'workflow_dispatch' ||
1919
github.event.client_payload.action == 'published'
2020
steps:
21+
- uses: actions/create-github-app-token@v1
22+
id: app-token
23+
with:
24+
app-id: ${{ vars.OCTOKIT_APP_ID }}
25+
private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }}
2126
- uses: actions/checkout@v4
2227
- uses: actions/setup-node@v4
2328
with:
2429
cache: npm
25-
node-version: 18
30+
node-version: lts/*
2631
- run: npm ci
2732
- run: >-
2833
echo "OCTOKIT_OPENAPI_VERSION=${{
@@ -47,7 +52,7 @@ jobs:
4752
if: github.event_name != 'push'
4853
uses: gr2m/[email protected]
4954
env:
50-
GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }}
55+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
5156
with:
5257
title: 🚧 OpenAPI types changed
5358
body: >
@@ -79,7 +84,7 @@ jobs:
7984
if: github.event_name == 'push'
8085
uses: gr2m/[email protected]
8186
env:
82-
GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }}
87+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
8388
with:
8489
title: 🚧 OpenAPI types changed
8590
body: >

0 commit comments

Comments
 (0)