Skip to content

Commit

Permalink
Single quote
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Oct 23, 2020
1 parent d4f812a commit 3eac6f7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,14 @@ const ANNOTATION_LEVELS = ['notice', 'warning', 'failure']
class GitHubApiUnauthorizedError extends Error {
constructor (message) {
super(message)
this.name = "GitHubApiUnauthorizedError"
this.name = 'GitHubApiUnauthorizedError'
}
}

class GitHubApiError extends Error {
constructor (message) {
super(message)
this.name = "GitHubApiError"
this.name = 'GitHubApiError'
}
}

Expand All @@ -304,7 +304,7 @@ const batch = (size, inputs) => inputs.reduce((batches, input) => {
}, [[]])

const createCheck = async function (octokit, owner, repo, title, ref) {
core.info(`Creating check {owner: "${owner}", repo: "${repo}", name: ${title}}`)
core.info(`Creating check {owner: '${owner}', repo: '${repo}', name: ${title}}`)
try {
const { data: { id: checkRunId } } = await octokit.checks.create({
owner,
Expand All @@ -316,14 +316,14 @@ const createCheck = async function (octokit, owner, repo, title, ref) {
return checkRunId
} catch (err) {
if (err.message === 'Resource not accessible by integration') {
throw new GitHubApiUnauthorizedError(`Unable to create a check, please make sure that the provided 'repo-token' has write permissions to ${owner}/${repo} - cause: ${err}`)
throw new GitHubApiUnauthorizedError(`Unable to create a check, please make sure that the provided 'repo-token' has write permissions to '${owner}/${repo}' - cause: ${err}`)
}
throw new GitHubApiError(`Unable to create a check to ${owner}/${repo} - cause: ${err}`)
throw new GitHubApiError(`Unable to create a check to '${owner}/${repo}' - cause: ${err}`)
}
}

const updateCheck = async function (octokit, owner, repo, checkRunId, conclusion, title, summary, annotations) {
core.info(`Updating check {owner: "${owner}", repo: "${repo}", check_run_id: ${checkRunId}}`)
core.info(`Updating check {owner: '${owner}', repo: '${repo}', check_run_id: ${checkRunId}}`)
try {
await octokit.checks.update({
owner,
Expand All @@ -338,7 +338,7 @@ const updateCheck = async function (octokit, owner, repo, checkRunId, conclusion
}
})
} catch (err) {
throw new GitHubApiError(`Unable to update check {owner: "${owner}", repo: "${repo}", check_run_id: ${checkRunId}} - cause: ${err}`)
throw new GitHubApiError(`Unable to update check {owner: '${owner}', repo: '${repo}', check_run_id: ${checkRunId}} - cause: ${err}`)
}
}

Expand Down

0 comments on commit 3eac6f7

Please sign in to comment.