✨ use input instead of env to receive github token
Co-authored-by: Platane <me@platane.me>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import * as core from "@actions/core";
|
||||
import { generateContributionSnake } from "../generateContributionSnake";
|
||||
import { parseOutputsOption } from "../outputsOptions";
|
||||
import { config } from "dotenv";
|
||||
@@ -33,7 +34,7 @@ it(
|
||||
const outputs = parseOutputsOption(entries);
|
||||
|
||||
const results = await generateContributionSnake("platane", outputs, {
|
||||
githubToken: process.env.GITHUB_TOKEN!,
|
||||
githubToken: core.getInput("github_token"),
|
||||
});
|
||||
|
||||
expect(results[0]).toBeDefined();
|
||||
|
||||
@@ -12,7 +12,8 @@ import { parseOutputsOption } from "./outputsOptions";
|
||||
core.getInput("svg_out_path"),
|
||||
]
|
||||
);
|
||||
const githubToken = process.env.GITHUB_TOKEN!;
|
||||
const githubToken =
|
||||
process.env.GITHUB_TOKEN ?? core.getInput("github_token");
|
||||
|
||||
const { generateContributionSnake } = await import(
|
||||
"./generateContributionSnake"
|
||||
|
||||
Reference in New Issue
Block a user