1
0
mirror of https://github.com/prometheus/docs.git synced 2026-02-05 06:45:01 +01:00

Allow anonymous GitHub usage without GITHUB_TOKEN env variable (#2670)

In case the env var isn't present (like in a Netlify deploy without
sensitive variables), this makes sure that "auth" is undefined rather than
an invalid empty string.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
Julius Volz
2025-06-05 20:52:43 +02:00
committed by GitHub
parent cbfa1f27c7
commit b8f281d0f5

View File

@@ -4,5 +4,5 @@ import { Octokit } from "octokit";
dotenv.config(); dotenv.config();
export const octokit = new Octokit({ export const octokit = new Octokit({
auth: `${process.env.GITHUB_TOKEN}`, auth: process.env.GITHUB_TOKEN,
}); });