Skip to content

Commit

Permalink
Fix syntax error and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMGreene committed Mar 28, 2024
1 parent b974ee5 commit f6ded38
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/api-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,15 @@ async function findOrCreatePagesSite({ githubToken, enablement = true }) {
)
throw error
}
core.warning(
`Get Pages site failed. Error: ${error.message}`,
convertErrorToAnnotationProperties(error)
)
core.warning(`Get Pages site failed. Error: ${error.message}`, convertErrorToAnnotationProperties(error))
}

if (!pageObject && enablement) {
// Create a new Pages site if one doesn't exist
try {
pageObject = await enablePagesSite({ githubToken })
} catch (error) {
core.error(
`Create Pages site failed. Error: ${error.message}`,
convertErrorToAnnotationProperties(error)
)
core.error(`Create Pages site failed. Error: ${error.message}`, convertErrorToAnnotationProperties(error))
throw error
}

Expand All @@ -72,10 +67,7 @@ async function findOrCreatePagesSite({ githubToken, enablement = true }) {
try {
pageObject = await getPagesSite({ githubToken })
} catch (error) {
core.error(
`Get Pages site still failed. Error: ${error.message}`,
convertErrorToAnnotationProperties(error)
)
core.error(`Get Pages site still failed. Error: ${error.message}`, convertErrorToAnnotationProperties(error))
throw error
}
}
Expand Down

0 comments on commit f6ded38

Please sign in to comment.