Skip to content

Commit 513cd5b

Browse files
committed
tewaks
1 parent a2e3d7d commit 513cd5b

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

.github/workflows/example.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
pg-host: localhost
4646
pg-port: 5432
4747
pg-database: testdb
48-
github-token: ${{ secrets.GITHUB_TOKEN }}
48+
github-token: ${{ github.token }}
4949

5050
mysqldef-preview:
5151
runs-on: ubuntu-latest
@@ -83,7 +83,7 @@ jobs:
8383
mysql-host: 127.0.0.1
8484
mysql-port: 3306
8585
mysql-database: testdb
86-
github-token: ${{ secrets.GITHUB_TOKEN }}
86+
github-token: ${{ github.token }}
8787

8888
sqlite3def-preview:
8989
runs-on: ubuntu-latest
@@ -103,7 +103,7 @@ jobs:
103103
baseline-schema-file: examples/sqlite3def-current.sql
104104
schema-file: examples/sqlite3def-desired.sql
105105
sqlite-database: test.db
106-
github-token: ${{ secrets.GITHUB_TOKEN }}
106+
github-token: ${{ github.token }}
107107

108108
mssqldef-preview:
109109
runs-on: ubuntu-latest
@@ -153,4 +153,4 @@ jobs:
153153
mssql-host: localhost
154154
mssql-port: 1433
155155
mssql-database: testdb
156-
github-token: ${{ secrets.GITHUB_TOKEN }}
156+
github-token: ${{ github.token }}

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inputs:
1717
version:
1818
description: 'Version of sqldef to use'
1919
required: false
20-
default: 'v3.0.0'
20+
default: 'v3.0.1'
2121
config-file:
2222
description: 'Path to sqldef config file'
2323
required: false
@@ -83,7 +83,7 @@ inputs:
8383
# GitHub token for PR comments
8484
github-token:
8585
description: 'GitHub token for commenting on pull requests'
86-
required: false
86+
required: true
8787

8888
runs:
8989
using: 'node24'

src/main.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,8 @@ async function createComment(sqldefOutput: string, command: string, versionOutpu
230230
return;
231231
}
232232

233-
const token = core.getInput("github-token") || process.env.GITHUB_TOKEN;
234-
if (!token) {
235-
core.warning("No GitHub token provided, skipping comment");
236-
return;
237-
}
238-
239-
const octokit = github.getOctokit(token);
233+
const githubToken = core.getInput("github-token");
234+
const octokit = github.getOctokit(githubToken);
240235

241236
const { data: comments } = await octokit.rest.issues.listComments({
242237
owner: context.repo.owner,

0 commit comments

Comments
 (0)