Skip to content

Commit

Permalink
feat: build info commit link to github
Browse files Browse the repository at this point in the history
  • Loading branch information
grikomsn committed Nov 3, 2023
1 parent 03878df commit 636dc4d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/BuildInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@ import { ReactNode, useEffect, useState } from "react";

import { API_URL } from "@/constants/api";

const githubUrl = "https://github.com/skip-mev/ibc-dot-fun";

const buildInfo: [string, ReactNode][] = [
["node env", process.env.NODE_ENV],
["vercel", process.env.VERCEL ? "true" : "false"],
["api url", API_URL],
["commit", process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA],
[
"commit",
process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA
? `${githubUrl}/commit/${process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA}`
: null,
],
[
"pull request",
process.env.NEXT_PUBLIC_GIT_PULL_REQUEST_ID
? `https://github.com/skip-mev/ibc-dot-fun/pull/${process.env.NEXT_PUBLIC_GIT_PULL_REQUEST_ID}`
? `${githubUrl}/pull/${process.env.NEXT_PUBLIC_GIT_PULL_REQUEST_ID}`
: null,
],
];
Expand Down

0 comments on commit 636dc4d

Please sign in to comment.