提交 51267258 编写于 作者: S Stan Hu

Merge branch 'fix-microsoft-teams-notification-flags' into 'master'

Fix missing API notification flags for Microsoft Teams

See merge request gitlab-org/gitlab-ce!29824
---
title: Fix missing API notification flags for Microsoft Teams
merge_request: 29824
author: Seiji Suenaga
type: fixed
......@@ -1023,6 +1023,8 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `webhook` | string | true | The Microsoft Teams webhook. For example, `https://outlook.office.com/webhook/...` |
| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines |
| `notify_only_default_branch` | boolean | false | Send notifications only for the default branch |
| `push_events` | boolean | false | Enable notifications for push events |
| `issues_events` | boolean | false | Enable notifications for issue events |
| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events |
......
......@@ -683,8 +683,9 @@ module API
name: :webhook,
type: String,
desc: 'The Microsoft Teams webhook. e.g. https://outlook.office.com/webhook/…'
}
],
},
chat_notification_flags
].flatten,
'mattermost' => [
chat_notification_settings,
chat_notification_flags,
......
......@@ -289,6 +289,18 @@ describe MicrosoftTeamsService do
expect(result).to be_falsy
end
end
context 'when disabled' do
let(:pipeline) do
create(:ci_pipeline, :failed, project: project, ref: 'not-the-default-branch')
end
before do
chat_service.notify_only_default_branch = false
end
it_behaves_like 'call Microsoft Teams API'
end
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册