diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index af55cf8fc19f0c81dcc61a1a0c81e25e522a318f..a16790d5753a83d03fe11d0c29b27d0d5e9a128d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,4 +21,3 @@ jobs: - uses: ./ with: bot_github_token: ${{ secrets.BOT_GITHUB_TOKEN }} - milliseconds: 1000 diff --git a/action.yml b/action.yml index 883e6ff67e5e2eb7af994fa9e02926b3886d8f96..a96fdf0e5b69fb0c5444bd4457cc10af6771da7b 100644 --- a/action.yml +++ b/action.yml @@ -2,10 +2,9 @@ name: 'issue translator' description: 'The action for translating non-english issues content to english.' author: 'tomsun28' inputs: - milliseconds: # change this + bot_github_token: required: true - description: 'input description here' - default: 'default value if applicable' + description: 'bot_github_token' runs: using: 'node12' main: 'dist/index.js' diff --git a/src/main.ts b/src/main.ts index e0fafe1866539ab459306b3847fa1e543a414bde..31cb55bac4fbeaaa7f82a06e37dadcc2c2e52882 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,7 +6,6 @@ import translate from '@k3rn31p4nic/google-translate-api' async function run(): Promise { try { - core.info(JSON.stringify(github.context)) if ( github.context.eventName !== 'issue_comment' || github.context.payload.action || @@ -19,7 +18,6 @@ async function run(): Promise { } const issueCommentPayload = github.context .payload as webhook.EventPayloads.WebhookPayloadIssueComment - core.info(JSON.stringify(issueCommentPayload)) const issue_id = issueCommentPayload.issue.id const issue_origin_comment_body = issueCommentPayload.comment.body core.info(issue_origin_comment_body)