Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sureness
Issues Translate Action
提交
6a7ebaea
I
Issues Translate Action
项目概览
sureness
/
Issues Translate Action
通知
4
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
Issues Translate Action
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
6a7ebaea
编写于
11月 10, 2020
作者:
sinat_25235033
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix lint warning
上级
3c390ac7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
11 deletion
+17
-11
dist/index.js
dist/index.js
+0
-0
dist/index.js.map
dist/index.js.map
+0
-0
dist/licenses.txt
dist/licenses.txt
+0
-0
src/main.ts
src/main.ts
+17
-11
未找到文件。
dist/index.js
浏览文件 @
6a7ebaea
此差异由.gitattributes 抑制。
dist/index.js.map
浏览文件 @
6a7ebaea
此差异由.gitattributes 抑制。
dist/licenses.txt
浏览文件 @
6a7ebaea
此差异由.gitattributes 抑制。
src/main.ts
浏览文件 @
6a7ebaea
...
@@ -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
{
co
nsole
.
log
(
github
.
context
.
payload
)
co
re
.
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录