Commit 7da7bdc7 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 64cbe5c8 51267258
---
title: Fix missing API notification flags for Microsoft Teams
merge_request: 29824
author: Seiji Suenaga
type: fixed
...@@ -1023,6 +1023,8 @@ Parameters: ...@@ -1023,6 +1023,8 @@ Parameters:
| Parameter | Type | Required | Description | | Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `webhook` | string | true | The Microsoft Teams webhook. For example, `https://outlook.office.com/webhook/...` | | `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 | | `push_events` | boolean | false | Enable notifications for push events |
| `issues_events` | boolean | false | Enable notifications for issue events | | `issues_events` | boolean | false | Enable notifications for issue events |
| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events | | `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events |
......
...@@ -139,7 +139,7 @@ The union of A, B, and C is (1, 4) and (6, 7). Therefore, the total running time ...@@ -139,7 +139,7 @@ The union of A, B, and C is (1, 4) and (6, 7). Therefore, the total running time
(4 - 1) + (7 - 6) => 4 (4 - 1) + (7 - 6) => 4
``` ```
## Expanding and collapsing job log sections ### Expanding and collapsing job log sections
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/14664) in GitLab > [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/14664) in GitLab
> 12.0. > 12.0.
......
...@@ -683,8 +683,9 @@ module API ...@@ -683,8 +683,9 @@ module API
name: :webhook, name: :webhook,
type: String, type: String,
desc: 'The Microsoft Teams webhook. e.g. https://outlook.office.com/webhook/…' desc: 'The Microsoft Teams webhook. e.g. https://outlook.office.com/webhook/…'
} },
], chat_notification_flags
].flatten,
'mattermost' => [ 'mattermost' => [
chat_notification_settings, chat_notification_settings,
chat_notification_flags, chat_notification_flags,
......
...@@ -289,6 +289,18 @@ describe MicrosoftTeamsService do ...@@ -289,6 +289,18 @@ describe MicrosoftTeamsService do
expect(result).to be_falsy expect(result).to be_falsy
end end
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 end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment