feat: github-api-url (#88)
closes #77 --------- Co-authored-by: Parker Brown <17183625+parkerbxyz@users.noreply.github.com>
This commit is contained in:
9
post.js
9
post.js
@@ -5,12 +5,9 @@ import core from "@actions/core";
|
||||
import { post } from "./lib/post.js";
|
||||
import request from "./lib/request.js";
|
||||
|
||||
post(
|
||||
core,
|
||||
request.defaults({
|
||||
baseUrl: process.env["GITHUB_API_URL"],
|
||||
})
|
||||
).catch((error) => {
|
||||
const baseUrl = core.getInput("github-api-url").replace(/\/$/, "");
|
||||
|
||||
post(core, request.defaults({ baseUrl })).catch((error) => {
|
||||
/* c8 ignore next 3 */
|
||||
console.error(error);
|
||||
core.setFailed(error.message);
|
||||
|
||||
Reference in New Issue
Block a user