Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

ci(docs lint): fix commenting workflow (#36062)

Charis4b9662b21e1c
diff --git a/.github/workflows/docs-lint-v2-comment.yml b/.github/workflows/docs-lint-v2-comment.yml
index 7194e9e2181..cd882ce80bc 100644
--- a/.github/workflows/docs-lint-v2-comment.yml
+++ b/.github/workflows/docs-lint-v2-comment.yml
@@ -28,7 +28,7 @@ jobs:
uses: actions/github-script@v7
with:
script: |
- const artifacts = await github.actions.listWorkflowRunArtifacts({
+ const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ github.event.workflow_run.id }}
@@ -38,7 +38,7 @@ jobs:
);
if (matchingArtifact) {
core.setOutput('contains_results', 'true')
- const download = await github.actions.downloadArtifact({
+ const download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchingArtifact.id,
@@ -59,7 +59,7 @@ jobs:
const fs = require('fs');
const prNumber = Number(fs.readFileSync('./pr_number.txt'));
const lintResults = fs.readFileSync('./lint_results.txt', 'utf8');
- await github.issues.createComment({
+ await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
diff --git a/apps/docs/features/docs/Troubleshooting.script.mjs b/apps/docs/features/docs/Troubleshooting.script.mjs
index e3a710b8747..6f5d00f175b 100644
--- a/apps/docs/features/docs/Troubleshooting.script.mjs
+++ b/apps/docs/features/docs/Troubleshooting.script.mjs
@@ -7,7 +7,7 @@
* Discussions.
*/
-import _configureDotEnv from '../../scripts/utils/dotenv'
+import '../../scripts/utils/dotenv.js'
import { createAppAuth } from '@octokit/auth-app'
import { Octokit } from '@octokit/core'
@@ -27,8 +27,6 @@ import {
getArticleSlug,
} from './Troubleshooting.utils.common.mjs'
-const _ = _configureDotEnv
-
const REPOSITORY_ID = 'MDEwOlJlcG9zaXRvcnkyMTQ1ODcxOTM='
const TROUBLESHOOTING_CATEGORY_ID = 'DIC_kwDODMpXOc4CUvEr'
const REPOSITORY_OWNER = 'supabase'
diff --git a/apps/docs/package.json b/apps/docs/package.json
index cd728bc0366..34ec1444f49 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -26,6 +26,7 @@
"prebuild": "pnpm run codegen:graphql && pnpm run codegen:references && pnpm run codegen:examples",
"predev": "pnpm run codegen:graphql && pnpm run codegen:references && pnpm run codegen:examples",
"preinstall": "npx only-allow pnpm",
+ "presync": "pnpm run codegen:graphql",
"pretest": "pnpm run codegen:examples",
"pretypecheck": "pnpm run codegen:graphql",
"start": "next start",
diff --git a/apps/docs/scripts/utils/dotenv.js b/apps/docs/scripts/utils/dotenv.js
new file mode 100644
index 00000000000..7913e8a5b00
--- /dev/null
+++ b/apps/docs/scripts/utils/dotenv.js
@@ -0,0 +1,8 @@
+// Must be a .js not a .ts so it can be imported outside of the scripts
+// directory without having to compile
+
+import dotenv from 'dotenv'
+
+dotenv.config({ path: '.env.local' })
+
+export default undefined
diff --git a/apps/docs/scripts/utils/dotenv.ts b/apps/docs/scripts/utils/dotenv.ts
deleted file mode 100644
index 6a826531068..00000000000
--- a/apps/docs/scripts/utils/dotenv.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import dotenv from 'dotenv'
-
-dotenv.config({ path: '.env.local' })
-
-export default undefined