Skip to content

Commit

Permalink
get username from constants file
Browse files Browse the repository at this point in the history
  • Loading branch information
horeaporutiu committed Sep 27, 2023
1 parent 1c3105c commit c4fedc4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/github-appcards/netlify/functions/project-cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**/
import { createClient } from "@supabase/supabase-js";
import fetch from "node-fetch";
import username from "../../src/constants.ts";

const supabase = createClient(
process.env.VITE_DATABASE_URL,
Expand All @@ -24,7 +25,9 @@ exports.handler = async function (event) {
const gitHubProjectCard = body.gitHubProjectCard;
const gitHubProjectColumnId = gitHubProjectCard.column_id;
const gitHubIssueNumer = gitHubProjectCard.content_url
.split("https: //api.github.com/repos/bishopwm/github-cards/issues/")
.split(
"https:// api.github.com/repos/" + username + "/github-cards/issues/",
)
.pop();

const headers = {
Expand Down

0 comments on commit c4fedc4

Please sign in to comment.