File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -457,7 +457,7 @@ module.exports = async function main() {
457
457
await command ( `git add .github/workflows/test.yml` ) ;
458
458
await command ( `git commit -m 'ci(test): initial version'` ) ;
459
459
460
- await createUpdatePrettierAction ( ) ;
460
+ await createUpdatePrettierAction ( { owner } ) ;
461
461
await command ( `git add .github/workflows/update-prettier.yml` ) ;
462
462
await command ( `git commit -m 'ci(update-prettier): initial version'` ) ;
463
463
Original file line number Diff line number Diff line change @@ -2,7 +2,10 @@ module.exports = createUpdatePrettierAction;
2
2
3
3
const writePrettyFile = require ( "./write-pretty-file" ) ;
4
4
5
- async function createUpdatePrettierAction ( ) {
5
+ async function createUpdatePrettierAction ( { owner } ) {
6
+ const githubTokenSecretName =
7
+ owner === "octokit" ? "OCTOKITBOT_PAT" : "GITHUB_TOKEN" ;
8
+
6
9
await writePrettyFile (
7
10
".github/workflows/update-prettier.yml" ,
8
11
`name: Update Prettier
24
27
- run: npm run lint:fix
25
28
26
29
env:
27
- GITHUB_TOKEN: \${{ secrets.OCTOKITBOT_PAT }}
30
+ GITHUB_TOKEN: \${{ secrets.${ githubTokenSecretName } }}
28
31
with:
29
32
title: "Prettier updated"
30
33
body: "An update to prettier required updates to your code."
You can’t perform that action at this time.
0 commit comments