We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61965fd commit d16ed2fCopy full SHA for d16ed2f
1 file changed
codegen.ts
@@ -3,11 +3,19 @@ import dotenv from 'dotenv';
3
4
dotenv.config();
5
6
+if (!process.env.GITHUB_TOKEN) {
7
+ console.warn(
8
+ '\x1b[33m⚠ GITHUB_TOKEN is not set. Skipping GraphQL codegen.\n' +
9
+ ' To generate updated types, create a .env file with a valid GitHub PAT.\n' +
10
+ ' See .env.template for details.\x1b[0m',
11
+ );
12
+ process.exit(0);
13
+}
14
+
15
const config: CodegenConfig = {
16
overwrite: true,
17
schema: {
18
'https://api.github.com/graphql': {
- // Add a custom header for authorization using your PAT
19
headers: {
20
Authorization: `Bearer ${process.env.GITHUB_TOKEN}`,
21
},
0 commit comments