mirror of
https://github.com/actions/deploy-pages.git
synced 2026-02-09 11:51:24 +00:00
fix broken test cases
This commit is contained in:
14
dist/index.js
vendored
14
dist/index.js
vendored
@@ -7142,8 +7142,10 @@ class Deployment {
|
||||
})
|
||||
this.requestedDeployment = true
|
||||
core.info(`Created deployment for ${this.buildVersion}`)
|
||||
core.info(JSON.stringify(response.data))
|
||||
this.deploymentInfo = response.data
|
||||
if (response && response.data) {
|
||||
core.info(JSON.stringify(response.data))
|
||||
this.deploymentInfo = response.data
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
core.info(error.stack)
|
||||
@@ -7155,7 +7157,13 @@ class Deployment {
|
||||
if (error.response) {
|
||||
let errorMessage = `Failed to create deployment (status: ${error.response.status}) with build version ${this.buildVersion}. `
|
||||
if (error.response.status == 400) {
|
||||
errorMessage += `Responded with: ${error.response.data?.message}`
|
||||
let message = ""
|
||||
if (error.response.data && error.response.data.message) {
|
||||
message = error.response.data.message
|
||||
} else {
|
||||
message = error.response.data
|
||||
}
|
||||
errorMessage += `Responded with: ${message}`
|
||||
}
|
||||
else if (error.response.status == 403) {
|
||||
errorMessage += `Ensure GITHUB_TOKEN has permission "pages: write".`
|
||||
|
||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
14
pre/index.js
14
pre/index.js
@@ -7142,8 +7142,10 @@ class Deployment {
|
||||
})
|
||||
this.requestedDeployment = true
|
||||
core.info(`Created deployment for ${this.buildVersion}`)
|
||||
core.info(JSON.stringify(response.data))
|
||||
this.deploymentInfo = response.data
|
||||
if (response && response.data) {
|
||||
core.info(JSON.stringify(response.data))
|
||||
this.deploymentInfo = response.data
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
core.info(error.stack)
|
||||
@@ -7155,7 +7157,13 @@ class Deployment {
|
||||
if (error.response) {
|
||||
let errorMessage = `Failed to create deployment (status: ${error.response.status}) with build version ${this.buildVersion}. `
|
||||
if (error.response.status == 400) {
|
||||
errorMessage += `Responded with: ${error.response.data?.message}`
|
||||
let message = ""
|
||||
if (error.response.data && error.response.data.message) {
|
||||
message = error.response.data.message
|
||||
} else {
|
||||
message = error.response.data
|
||||
}
|
||||
errorMessage += `Responded with: ${message}`
|
||||
}
|
||||
else if (error.response.status == 403) {
|
||||
errorMessage += `Ensure GITHUB_TOKEN has permission "pages: write".`
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -62,8 +62,10 @@ class Deployment {
|
||||
})
|
||||
this.requestedDeployment = true
|
||||
core.info(`Created deployment for ${this.buildVersion}`)
|
||||
core.info(JSON.stringify(response.data))
|
||||
this.deploymentInfo = response.data
|
||||
if (response && response.data) {
|
||||
core.info(JSON.stringify(response.data))
|
||||
this.deploymentInfo = response.data
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
core.info(error.stack)
|
||||
@@ -75,7 +77,13 @@ class Deployment {
|
||||
if (error.response) {
|
||||
let errorMessage = `Failed to create deployment (status: ${error.response.status}) with build version ${this.buildVersion}. `
|
||||
if (error.response.status == 400) {
|
||||
errorMessage += `Responded with: ${error.response.data?.message}`
|
||||
let message = ""
|
||||
if (error.response.data && error.response.data.message) {
|
||||
message = error.response.data.message
|
||||
} else {
|
||||
message = error.response.data
|
||||
}
|
||||
errorMessage += `Responded with: ${message}`
|
||||
}
|
||||
else if (error.response.status == 403) {
|
||||
errorMessage += `Ensure GITHUB_TOKEN has permission "pages: write".`
|
||||
|
||||
Reference in New Issue
Block a user