try some logging

This commit is contained in:
Jeremy Daley
2023-02-10 01:39:32 -05:00
parent ccd0e3abe9
commit 50408c8053
3 changed files with 13 additions and 9 deletions

10
dist/index.js vendored
View File

@@ -13035,15 +13035,17 @@ async function enablePagesSite({ repositoryNwo, githubToken, proxy }) {
}
async function getPagesSite({ repositoryNwo, githubToken, proxy }) {
console.log('Using proxy:', proxy)
const pagesEndpoint = `${getApiBaseUrl()}/repos/${repositoryNwo}/pages`
const response = await axios.get(pagesEndpoint, {
...(proxy ? {httpsAgent: HPA(proxy)} : {}),
const config = {
...(proxy ? { httpsAgent: HPA(proxy) } : {}),
headers: {
Accept: 'application/vnd.github.v3+json',
Authorization: `Bearer ${githubToken}`
}
})
}
const response = await axios.get(pagesEndpoint, config)
const pageObject = response.data
return pageObject

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@@ -35,15 +35,17 @@ async function enablePagesSite({ repositoryNwo, githubToken, proxy }) {
}
async function getPagesSite({ repositoryNwo, githubToken, proxy }) {
console.log('Using proxy:', proxy)
const pagesEndpoint = `${getApiBaseUrl()}/repos/${repositoryNwo}/pages`
const response = await axios.get(pagesEndpoint, {
...(proxy ? {httpsAgent: HPA(proxy)} : {}),
const config = {
...(proxy ? { httpsAgent: HPA(proxy) } : {}),
headers: {
Accept: 'application/vnd.github.v3+json',
Authorization: `Bearer ${githubToken}`
}
})
}
const response = await axios.get(pagesEndpoint, config)
const pageObject = response.data
return pageObject