mirror of
https://github.com/actions/configure-pages.git
synced 2025-12-08 16:16:09 +00:00
fix hardcoded api endpoint
This commit is contained in:
4
dist/index.js
vendored
4
dist/index.js
vendored
@@ -14746,7 +14746,7 @@ const core = __nccwpck_require__(2186)
|
|||||||
const axios = __nccwpck_require__(6545)
|
const axios = __nccwpck_require__(6545)
|
||||||
|
|
||||||
async function enablePages({repositoryNwo, githubToken}) {
|
async function enablePages({repositoryNwo, githubToken}) {
|
||||||
const pagesEndpoint = `https://api.github.com/repos/${repositoryNwo}/pages`
|
const pagesEndpoint = `${process.env.GITHUB_API_URL ?? 'https://api.github.com'}/repos/${repositoryNwo}/pages`
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await axios.post(
|
const response = await axios.post(
|
||||||
@@ -14790,7 +14790,7 @@ async function getPagesBaseUrl({
|
|||||||
staticSiteGenerator
|
staticSiteGenerator
|
||||||
}) {
|
}) {
|
||||||
try {
|
try {
|
||||||
const pagesEndpoint = `https://api.github.com/repos/${repositoryNwo}/pages`
|
const pagesEndpoint = `${process.env.GITHUB_API_URL ?? 'https://api.github.com'}/repos/${repositoryNwo}/pages`
|
||||||
|
|
||||||
core.info(`Get the Base URL to the page with endpoint ${pagesEndpoint}`)
|
core.info(`Get the Base URL to the page with endpoint ${pagesEndpoint}`)
|
||||||
const response = await axios.get(pagesEndpoint, {
|
const response = await axios.get(pagesEndpoint, {
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@ const core = require('@actions/core')
|
|||||||
const axios = require('axios')
|
const axios = require('axios')
|
||||||
|
|
||||||
async function enablePages({repositoryNwo, githubToken}) {
|
async function enablePages({repositoryNwo, githubToken}) {
|
||||||
const pagesEndpoint = `https://api.github.com/repos/${repositoryNwo}/pages`
|
const pagesEndpoint = `${process.env.GITHUB_API_URL ?? 'https://api.github.com'}/repos/${repositoryNwo}/pages`
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await axios.post(
|
const response = await axios.post(
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ async function getPagesBaseUrl({
|
|||||||
staticSiteGenerator
|
staticSiteGenerator
|
||||||
}) {
|
}) {
|
||||||
try {
|
try {
|
||||||
const pagesEndpoint = `https://api.github.com/repos/${repositoryNwo}/pages`
|
const pagesEndpoint = `${process.env.GITHUB_API_URL ?? 'https://api.github.com'}/repos/${repositoryNwo}/pages`
|
||||||
|
|
||||||
core.info(`Get the Base URL to the page with endpoint ${pagesEndpoint}`)
|
core.info(`Get the Base URL to the page with endpoint ${pagesEndpoint}`)
|
||||||
const response = await axios.get(pagesEndpoint, {
|
const response = await axios.get(pagesEndpoint, {
|
||||||
|
|||||||
Reference in New Issue
Block a user