mirror of
https://github.com/actions/configure-pages.git
synced 2025-12-08 16:16:09 +00:00
try some logging
This commit is contained in:
8
dist/index.js
vendored
8
dist/index.js
vendored
@@ -13035,15 +13035,17 @@ async function enablePagesSite({ repositoryNwo, githubToken, proxy }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getPagesSite({ repositoryNwo, githubToken, proxy }) {
|
async function getPagesSite({ repositoryNwo, githubToken, proxy }) {
|
||||||
|
console.log('Using proxy:', proxy)
|
||||||
const pagesEndpoint = `${getApiBaseUrl()}/repos/${repositoryNwo}/pages`
|
const pagesEndpoint = `${getApiBaseUrl()}/repos/${repositoryNwo}/pages`
|
||||||
|
const config = {
|
||||||
const response = await axios.get(pagesEndpoint, {
|
|
||||||
...(proxy ? { httpsAgent: HPA(proxy) } : {}),
|
...(proxy ? { httpsAgent: HPA(proxy) } : {}),
|
||||||
headers: {
|
headers: {
|
||||||
Accept: 'application/vnd.github.v3+json',
|
Accept: 'application/vnd.github.v3+json',
|
||||||
Authorization: `Bearer ${githubToken}`
|
Authorization: `Bearer ${githubToken}`
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
|
const response = await axios.get(pagesEndpoint, config)
|
||||||
|
|
||||||
const pageObject = response.data
|
const pageObject = response.data
|
||||||
return pageObject
|
return pageObject
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -35,15 +35,17 @@ async function enablePagesSite({ repositoryNwo, githubToken, proxy }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getPagesSite({ repositoryNwo, githubToken, proxy }) {
|
async function getPagesSite({ repositoryNwo, githubToken, proxy }) {
|
||||||
|
console.log('Using proxy:', proxy)
|
||||||
const pagesEndpoint = `${getApiBaseUrl()}/repos/${repositoryNwo}/pages`
|
const pagesEndpoint = `${getApiBaseUrl()}/repos/${repositoryNwo}/pages`
|
||||||
|
const config = {
|
||||||
const response = await axios.get(pagesEndpoint, {
|
|
||||||
...(proxy ? { httpsAgent: HPA(proxy) } : {}),
|
...(proxy ? { httpsAgent: HPA(proxy) } : {}),
|
||||||
headers: {
|
headers: {
|
||||||
Accept: 'application/vnd.github.v3+json',
|
Accept: 'application/vnd.github.v3+json',
|
||||||
Authorization: `Bearer ${githubToken}`
|
Authorization: `Bearer ${githubToken}`
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
|
const response = await axios.get(pagesEndpoint, config)
|
||||||
|
|
||||||
const pageObject = response.data
|
const pageObject = response.data
|
||||||
return pageObject
|
return pageObject
|
||||||
|
|||||||
Reference in New Issue
Block a user