提交 6a7ebaea 编写于 作者: sinat_25235033's avatar sinat_25235033

fix lint warning

上级 3c390ac7
此差异由.gitattributes 抑制。
此差异由.gitattributes 抑制。
此差异由.gitattributes 抑制。
...@@ -5,20 +5,26 @@ import * as webhook from '@octokit/webhooks' ...@@ -5,20 +5,26 @@ import * as webhook from '@octokit/webhooks'
async function run(): Promise<void> { async function run(): Promise<void> {
try { try {
core.info(JSON.stringify(github.context))
console.log(github.context) if (
if (github.context.payload.action && !['created', 'opened'].includes(github.context.payload.action)) { github.context.payload.action &&
console.log(`The status of the action is no applicable ${github.context.payload.action}, return`) !['created', 'opened'].includes(github.context.payload.action)
) {
core.info(
`The status of the action is no applicable ${github.context.payload.action}, return`
)
return return
} }
if (github.context.eventName == "issue") { if (github.context.eventName === 'issue') {
const issuePayload = github.context.payload as webhook.EventPayloads.WebhookPayloadIssues; const issuePayload = github.context
console.log(issuePayload) .payload as webhook.EventPayloads.WebhookPayloadIssues
} else if (github.context.eventName == "issue_comment") { core.info(JSON.stringify(issuePayload))
const issueCommentPayload = github.context.payload as webhook.EventPayloads.WebhookPayloadIssueComment; } else if (github.context.eventName === 'issue_comment') {
console.log(issueCommentPayload) const issueCommentPayload = github.context
.payload as webhook.EventPayloads.WebhookPayloadIssueComment
core.info(JSON.stringify(issueCommentPayload))
} else { } else {
console.log(github.context.payload) core.info(JSON.stringify(github.context.payload))
} }
const ms: string = core.getInput('milliseconds') const ms: string = core.getInput('milliseconds')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册