mirror of
https://github.com/xuexb/github-bot.git
synced 2026-01-25 14:06:59 +00:00
fix: action name is undefined
This commit is contained in:
parent
d67c46d61f
commit
a3643b1a25
@ -22,7 +22,10 @@ app.use(ctx => {
|
||||
const payload = ctx.request.body;
|
||||
const action = payload.action || payload.ref_type;
|
||||
|
||||
eventName += `_${action}`;
|
||||
if (action) {
|
||||
eventName += `_${action}`;
|
||||
}
|
||||
|
||||
console.log(`receive event: ${eventName}`);
|
||||
|
||||
if (payload.sender.login !== process.env.GITHUB_BOT_NAME) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user