Skip to content

Commit 19c4e8d

Browse files
fix(issue events): assignees may be undefined
在 gitlab-13.5.3-ee 中测试发现 issue 类型事件中,assignees 不指定的情况下为 undefined
1 parent 63b58ed commit 19c4e8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/service/webhook.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class WebhookService extends Service {
220220
return content
221221
}
222222

223-
async assembleIssueMsq(content, { user, project, repository, object_attributes, assignees, assignee, labels }) {
223+
async assembleIssueMsq(content, { user, project, repository, object_attributes, assignees = [], assignee, labels }) {
224224
const { id: issueId, title, state, action, description, url: issueUrl } = object_attributes || {};
225225
const { name: projName, web_url, path_with_namespace } = project || {};
226226
const { name, username } = user || {};
@@ -455,4 +455,4 @@ class WebhookService extends Service {
455455

456456
}
457457

458-
module.exports = WebhookService;
458+
module.exports = WebhookService;

0 commit comments

Comments
 (0)