update @octokit/rest from 16.43.1 to 17.9.2 (#62)

This commit is contained in:
Naoki Oketani
2020-05-23 14:46:31 +09:00
committed by GitHub
parent 49b1b8cc78
commit 161485c040
5 changed files with 3473 additions and 1068 deletions

View File

@@ -25,7 +25,9 @@ export async function run(): Promise<void> {
// get GitHub information
const ctx = JSON.parse(core.getInput('github_context'))
const token: string = core.getInput('github_token', {required: true})
const octokit = new github.GitHub(token)
const octokit = new Octokit({
auth: token
})
if (ctx.event_name === 'pull_request') {
await pr.createComment(
@@ -42,14 +44,10 @@ export async function run(): Promise<void> {
// remove control characters and create a code block
const issueBody = audit.strippedStdout()
const option: IssueOption = issue.getIssueOption(issueBody)
const {
data: createdIssue
}: Octokit.Response<Octokit.IssuesCreateResponse> = await octokit.issues.create(
{
...github.context.repo,
...option
}
)
const {data: createdIssue} = await octokit.issues.create({
...github.context.repo,
...option
})
core.debug(`#${createdIssue.number}`)
core.setFailed('This repo has some vulnerabilities')
}