Skip to content

Commit

Permalink
feat: repo url from env var
Browse files Browse the repository at this point in the history
  • Loading branch information
leapalazzolo committed Jan 30, 2024
1 parent c731eff commit 6f68be6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ jobs:
env:
NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }}
REPO_LIST_DB_ID: ${{ secrets.REPO_LIST_DB_ID }}
REPOSITORY_CLASSIFICATION_URL: https://kudos-ink.github.io/repository-classification/
5 changes: 2 additions & 3 deletions lib/repository-metadata/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { FilterOption, FilterOptions } from "@/types/filters";

const REPOSITORY_CLASSIFICATION_URL =
"https://kudos-ink.github.io/repository-classification/";
const REPOSITORY_CLASSIFICATION_URL = process.env.REPOSITORY_CLASSIFICATION_URL;

async function fetchData(url: string): Promise<FilterOption[]> {
try {
Expand Down Expand Up @@ -36,7 +35,7 @@ export async function fetchFilterOptions(): Promise<FilterOptions> {
// We want repositories with the id used in Notion.
// If they don't have it means they aren't loaded in the
// Notion table yet
const repositories = allRepositories.filter((value) => !!value.id);
const repositories = allRepositories.filter((value) => value.id && value.id !== "");
return { interests, languages, repositories };
} catch (error) {
console.error("Error fetching filter options:", error);
Expand Down

0 comments on commit 6f68be6

Please sign in to comment.