Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: call db to retrieve permits instead of parsing github comments #164

Merged
merged 12 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion build/esbuild-config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as dotenv from "dotenv";
import esbuild from "esbuild";
import { invertColors } from "./plugins/invert-colors";

const typescriptEntries = [
"static/scripts/rewards/index.ts",
"static/scripts/audit-report/audit.ts",
Expand All @@ -24,4 +25,19 @@ export let esBuildContext = {
".svg": "dataurl",
},
outdir: "static/out",
define: createEnvDefines(["SUPABASE_URL", "SUPABASE_KEY"]),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-02-17 at 16 26 50

Looks like we need to add this to our repo secrets?

Copy link
Member

@0x4007 0x4007 Feb 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the necessary values and tried rerunning the CI but it failed again. Perhaps you can try pushing to force it to run again? I have a feeling you may not be loading in the secrets correctly though. Did you prove this works on your local?

Screenshot 2024-02-17 at 16 29 24

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My local works fine, I'll have a look at the logs. Also it uses the Supabase you shared to me

} as esbuild.BuildOptions;

function createEnvDefines(variableNames: string[]): Record<string, string> {
const defines: Record<string, string> = {};
dotenv.config();
for (const name of variableNames) {
const envVar = process.env[name];
if (envVar !== undefined) {
defines[`process.env.${name}`] = JSON.stringify(envVar);
} else {
throw new Error(`Missing environment variable: ${name}`);
}
}
return defines;
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@octokit/plugin-throttling": "^5.1.0",
"@octokit/rest": "^19.0.7",
"@sinclair/typebox": "^0.31.28",
"@supabase/supabase-js": "2.39.6",
"@types/libsodium-wrappers": "^0.7.10",
"@types/node": "^18.15.11",
"@uniswap/permit2-sdk": "^1.2.0",
Expand Down
Loading