提交 68cb8cc6 编写于 作者: sinat_25235033's avatar sinat_25235033

use bot_github_token

上级 b8326b92
...@@ -21,4 +21,3 @@ jobs: ...@@ -21,4 +21,3 @@ jobs:
- uses: ./ - uses: ./
with: with:
bot_github_token: ${{ secrets.BOT_GITHUB_TOKEN }} bot_github_token: ${{ secrets.BOT_GITHUB_TOKEN }}
milliseconds: 1000
...@@ -2,10 +2,9 @@ name: 'issue translator' ...@@ -2,10 +2,9 @@ name: 'issue translator'
description: 'The action for translating non-english issues content to english.' description: 'The action for translating non-english issues content to english.'
author: 'tomsun28' author: 'tomsun28'
inputs: inputs:
milliseconds: # change this bot_github_token:
required: true required: true
description: 'input description here' description: 'bot_github_token'
default: 'default value if applicable'
runs: runs:
using: 'node12' using: 'node12'
main: 'dist/index.js' main: 'dist/index.js'
...@@ -6,7 +6,6 @@ import translate from '@k3rn31p4nic/google-translate-api' ...@@ -6,7 +6,6 @@ import translate from '@k3rn31p4nic/google-translate-api'
async function run(): Promise<void> { async function run(): Promise<void> {
try { try {
core.info(JSON.stringify(github.context))
if ( if (
github.context.eventName !== 'issue_comment' || github.context.eventName !== 'issue_comment' ||
github.context.payload.action || github.context.payload.action ||
...@@ -19,7 +18,6 @@ async function run(): Promise<void> { ...@@ -19,7 +18,6 @@ async function run(): Promise<void> {
} }
const issueCommentPayload = github.context const issueCommentPayload = github.context
.payload as webhook.EventPayloads.WebhookPayloadIssueComment .payload as webhook.EventPayloads.WebhookPayloadIssueComment
core.info(JSON.stringify(issueCommentPayload))
const issue_id = issueCommentPayload.issue.id const issue_id = issueCommentPayload.issue.id
const issue_origin_comment_body = issueCommentPayload.comment.body const issue_origin_comment_body = issueCommentPayload.comment.body
core.info(issue_origin_comment_body) core.info(issue_origin_comment_body)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册