Skip to content

Commit fa35d96

Browse files
authored
ci: replace OCTOKITBOT_PROJECT_ACTION_TOKEN and OCTOKITBOT_PAT with a token from https://github.com/apps/octokit (#796)
Apply changes from octokit/endpoint.js#482 Part of octokit/maintainers#34
1 parent 296431a commit fa35d96

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

.github/workflows/add_to_octokit_project.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ jobs:
1212
runs-on: ubuntu-latest
1313
continue-on-error: true
1414
steps:
15+
- uses: actions/create-github-app-token@v2
16+
id: app-token
17+
with:
18+
app-id: ${{ vars.OCTOKIT_APP_ID }}
19+
private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }}
1520
- uses: actions/add-to-project@v1.0.2
1621
with:
1722
project-url: https://github.com/orgs/octokit/projects/10
18-
github-token: ${{ secrets.OCTOKITBOT_PROJECT_ACTION_TOKEN }}
23+
github-token: ${{ steps.app-token.outputs.token }}
1924
labeled: "Status: Stale"
2025
label-operator: NOT

.github/workflows/immediate-response.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- opened
1212
jobs:
1313
respond-to-issue:
14-
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' && github.actor != 'githubactions[bot]' && github.actor != 'octokitbot' }}
14+
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' && github.actor != 'githubactions[bot]' && github.actor != 'octokitbot' && github.actor != 'octokit[bot]' }}
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Determine issue or PR number

.github/workflows/update-prettier.yml

+7-2
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@v2
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:
1318
cache: npm
14-
node-version: 16
19+
node-version: lts/*
1520
- run: npm ci
1621
- run: npm run lint:fix
1722
- uses: gr2m/create-or-update-pull-request-action@v1.x
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

+8-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ jobs:
1313
update_routes:
1414
runs-on: ubuntu-latest
1515
steps:
16+
- uses: actions/create-github-app-token@v2
17+
id: app-token
18+
with:
19+
app-id: ${{ vars.OCTOKIT_APP_ID }}
20+
private-key: ${{ secrets.OCTOKIT_APP_PRIVATE_KEY }}
1621
- uses: actions/checkout@v4
1722
with:
18-
token: ${{ secrets.OCTOKITBOT_PAT }}
23+
token: ${{ steps.app-token.outputs.token }}
1924
- uses: actions/setup-node@v4
2025
with:
21-
node-version: 20
26+
node-version: lts/*
2227
cache: npm
2328
- run: git checkout routes-update || true
2429
- run: npm install @octokit/types@latest
@@ -53,7 +58,7 @@ jobs:
5358
- name: Create Pull Request
5459
uses: gr2m/create-or-update-pull-request-action@v1.x
5560
env:
56-
GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }}
61+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
5762
with:
5863
title: 🚧 GitHub OpenAPI specifications changed
5964
body: >

0 commit comments

Comments
 (0)