Skip to content

Commit

Permalink
remove unused import, fix typescript complaint with catch(e) unknown …
Browse files Browse the repository at this point in the history
…type
  • Loading branch information
AnthonyKinson committed Nov 24, 2021
1 parent 4d26b30 commit a0d49c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import * as core from '@actions/core'
import {context, getOctokit} from '@actions/github'
import {ActionsListJobsForWorkflowRunResponseData} from '@octokit/types'
import {IncomingWebhook} from '@slack/webhook'
import {MessageAttachment} from '@slack/types'

Expand Down Expand Up @@ -195,8 +194,10 @@ async function main(): Promise<void> {

try {
await slack_webhook.send(slack_payload_body)
} catch (e) {
core.setFailed(e)
} catch (err) {
if (err instanceof Error) {
core.setFailed(err.message)
}
}
}

Expand Down

0 comments on commit a0d49c8

Please sign in to comment.