Commit 0c8d7e84 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '32364-updating-slack-notification-not-working-by-api' into 'master'

Resolve "Updating Slack Notification not working by API"

Closes #32364 et #22306

See merge request gitlab-org/gitlab-ce!11435
parents 7fdb7762 e84fd5cc
---
title: Support new chat notifications parameters in Services API
merge_request: 11435
author:
type: added
# Services API # Services API
>**Note:** This API requires an access token with Master or Owner permissions
## Asana ## Asana
Asana - Teamwork without email Asana - Teamwork without email
...@@ -16,8 +18,10 @@ PUT /projects/:id/services/asana ...@@ -16,8 +18,10 @@ PUT /projects/:id/services/asana
Parameters: Parameters:
- `api_key` (**required**) - User API token. User must have access to task, all comments will be attributed to this user. | Parameter | Type | Required | Description |
- `restrict_to_branch` (optional) - Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches. | --------- | ---- | -------- | ----------- |
| `api_key` | string | true | User API token. User must have access to task, all comments will be attributed to this user. |
| `restrict_to_branch` | string | false | Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches. |
### Delete Asana service ### Delete Asana service
...@@ -49,8 +53,10 @@ PUT /projects/:id/services/assembla ...@@ -49,8 +53,10 @@ PUT /projects/:id/services/assembla
Parameters: Parameters:
- `token` (**required**) | Parameter | Type | Required | Description |
- `subdomain` (optional) | --------- | ---- | -------- | ----------- |
| `token` | string | true | The authentication token
| `subdomain` | string | false | The subdomain setting |
### Delete Assembla service ### Delete Assembla service
...@@ -84,10 +90,12 @@ PUT /projects/:id/services/bamboo ...@@ -84,10 +90,12 @@ PUT /projects/:id/services/bamboo
Parameters: Parameters:
- `bamboo_url` (**required**) - Bamboo root URL like https://bamboo.example.com | Parameter | Type | Required | Description |
- `build_key` (**required**) - Bamboo build plan key like KEY | --------- | ---- | -------- | ----------- |
- `username` (**required**) - A user with API access, if applicable | `bamboo_url` | string | true | Bamboo root URL like https://bamboo.example.com |
- `password` (**required**) | `build_key` | string | true | Bamboo build plan key like KEY |
| `username` | string | true | A user with API access, if applicable |
| `password` | string | true | Password of the user |
### Delete Atlassian Bamboo CI service ### Delete Atlassian Bamboo CI service
...@@ -105,6 +113,44 @@ Get Atlassian Bamboo CI service settings for a project. ...@@ -105,6 +113,44 @@ Get Atlassian Bamboo CI service settings for a project.
GET /projects/:id/services/bamboo GET /projects/:id/services/bamboo
``` ```
## Bugzilla
Bugzilla Issue Tracker
### Create/Edit Buildkite service
Set Bugzilla service for a project.
```
PUT /projects/:id/services/bugzilla
```
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `new_issue_url` | string | true | New Issue url |
| `issues_url` | string | true | Issue url |
| `project_url` | string | true | Project url |
| `description` | string | false | Description |
| `title` | string | false | Title |
### Delete Bugzilla Service
Delete Bugzilla service for a project.
```
DELETE /projects/:id/services/bugzilla
```
### Get Bugzilla Service Settings
Get Bugzilla service settings for a project.
```
GET /projects/:id/services/bugzilla
```
## Buildkite ## Buildkite
Continuous integration and deployments Continuous integration and deployments
...@@ -119,9 +165,11 @@ PUT /projects/:id/services/buildkite ...@@ -119,9 +165,11 @@ PUT /projects/:id/services/buildkite
Parameters: Parameters:
- `token` (**required**) - Buildkite project GitLab token | Parameter | Type | Required | Description |
- `project_url` (**required**) - https://buildkite.com/example/project | --------- | ---- | -------- | ----------- |
- `enable_ssl_verification` (optional) - Enable SSL verification | `token` | string | true | Buildkite project GitLab token |
| `project_url` | string | true | https://buildkite.com/example/project |
| `enable_ssl_verification` | boolean | false | Enable SSL verification |
### Delete Buildkite service ### Delete Buildkite service
...@@ -153,9 +201,11 @@ PUT /projects/:id/services/campfire ...@@ -153,9 +201,11 @@ PUT /projects/:id/services/campfire
Parameters: Parameters:
- `token` (**required**) | Parameter | Type | Required | Description |
- `subdomain` (optional) | --------- | ---- | -------- | ----------- |
- `room` (optional) | `token` | string | true | Campfire token |
| `subdomain` | string | false | Campfire subdomain |
| `room` | string | false | Campfire room |
### Delete Campfire service ### Delete Campfire service
...@@ -187,11 +237,13 @@ PUT /projects/:id/services/custom-issue-tracker ...@@ -187,11 +237,13 @@ PUT /projects/:id/services/custom-issue-tracker
Parameters: Parameters:
- `new_issue_url` (**required**) - New Issue url | Parameter | Type | Required | Description |
- `issues_url` (**required**) - Issue url | --------- | ---- | -------- | ----------- |
- `project_url` (**required**) - Project url | `new_issue_url` | string | true | New Issue url
- `description` (optional) - Custom issue tracker | `issues_url` | string | true | Issue url
- `title` (optional) - Custom Issue Tracker | `project_url` | string | true | Project url
| `description` | string | false | Description
| `title` | string | false | Title
### Delete Custom Issue Tracker service ### Delete Custom Issue Tracker service
...@@ -223,9 +275,11 @@ PUT /projects/:id/services/drone-ci ...@@ -223,9 +275,11 @@ PUT /projects/:id/services/drone-ci
Parameters: Parameters:
- `token` (**required**) - Drone CI project specific token | Parameter | Type | Required | Description |
- `drone_url` (**required**) - http://drone.example.com | --------- | ---- | -------- | ----------- |
- `enable_ssl_verification` (optional) - Enable SSL verification | `token` | string | true | Drone CI project specific token |
| `drone_url` | string | true | http://drone.example.com |
| `enable_ssl_verification` | boolean | false | Enable SSL verification |
### Delete Drone CI service ### Delete Drone CI service
...@@ -257,9 +311,11 @@ PUT /projects/:id/services/emails-on-push ...@@ -257,9 +311,11 @@ PUT /projects/:id/services/emails-on-push
Parameters: Parameters:
- `recipients` (**required**) - Emails separated by whitespace | Parameter | Type | Required | Description |
- `disable_diffs` (optional) - Disable code diffs | --------- | ---- | -------- | ----------- |
- `send_from_committer_email` (optional) - Send from committer | `recipients` | string | true | Emails separated by whitespace |
| `disable_diffs` | boolean | false | Disable code diffs |
| `send_from_committer_email` | boolean | false | Send from committer |
### Delete Emails on push service ### Delete Emails on push service
...@@ -291,7 +347,9 @@ PUT /projects/:id/services/external-wiki ...@@ -291,7 +347,9 @@ PUT /projects/:id/services/external-wiki
Parameters: Parameters:
- `external_wiki_url` (**required**) - The URL of the external Wiki | Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `external_wiki_url` | string | true | The URL of the external Wiki |
### Delete External Wiki service ### Delete External Wiki service
...@@ -323,7 +381,9 @@ PUT /projects/:id/services/flowdock ...@@ -323,7 +381,9 @@ PUT /projects/:id/services/flowdock
Parameters: Parameters:
- `token` (**required**) - Flowdock Git source token | Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `token` | string | true | Flowdock Git source token |
### Delete Flowdock service ### Delete Flowdock service
...@@ -355,8 +415,10 @@ PUT /projects/:id/services/gemnasium ...@@ -355,8 +415,10 @@ PUT /projects/:id/services/gemnasium
Parameters: Parameters:
- `api_key` (**required**) - Your personal API KEY on gemnasium.com | Parameter | Type | Required | Description |
- `token` (**required**) - The project's slug on gemnasium.com | --------- | ---- | -------- | ----------- |
| `api_key` | string | true | Your personal API KEY on gemnasium.com |
| `token` | string | true | The project's slug on gemnasium.com |
### Delete Gemnasium service ### Delete Gemnasium service
...@@ -388,12 +450,14 @@ PUT /projects/:id/services/hipchat ...@@ -388,12 +450,14 @@ PUT /projects/:id/services/hipchat
Parameters: Parameters:
- `token` (**required**) - Room token | Parameter | Type | Required | Description |
- `color` (optional) | --------- | ---- | -------- | ----------- |
- `notify` (optional) | `token` | string | true | Room token |
- `room` (optional) - Room name or ID | `color` | string | false | The room color |
- `api_version` (optional) - Leave blank for default (v2) | `notify` | boolean | false | Enable notifications |
- `server` (optional) - Leave blank for default. https://hipchat.example.com | `room` | string | false |Room name or ID |
| `api_version` | string | false | Leave blank for default (v2) |
| `server` | string | false | Leave blank for default. https://hipchat.example.com |
### Delete HipChat service ### Delete HipChat service
...@@ -427,11 +491,13 @@ PUT /projects/:id/services/irker ...@@ -427,11 +491,13 @@ PUT /projects/:id/services/irker
Parameters: Parameters:
- `recipients` (**required**) - Recipients/channels separated by whitespaces | Parameter | Type | Required | Description |
- `default_irc_uri` (optional) - irc://irc.network.net:6697/ | --------- | ---- | -------- | ----------- |
- `server_port` (optional) - 6659 | `recipients` | string | true | Recipients/channels separated by whitespaces |
- `server_host` (optional) - localhost | `default_irc_uri` | string | false | irc://irc.network.net:6697/ |
- `colorize_messages` (optional) | `server_host` | string | false | localhost |
| `server_port` | integer | false | 6659 |
| `colorize_messages` | boolean | false | Colorize messages |
### Delete Irker (IRC gateway) service ### Delete Irker (IRC gateway) service
...@@ -474,7 +540,9 @@ Set JIRA service for a project. ...@@ -474,7 +540,9 @@ Set JIRA service for a project.
PUT /projects/:id/services/jira PUT /projects/:id/services/jira
``` ```
| Attribute | Type | Required | Description | Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `url` | string | yes | The URL to the JIRA project which is being linked to this GitLab project, e.g., `https://jira.example.com`. | | `url` | string | yes | The URL to the JIRA project which is being linked to this GitLab project, e.g., `https://jira.example.com`. |
| `project_key` | string | yes | The short identifier for your JIRA project, all uppercase, e.g., `PROJ`. | | `project_key` | string | yes | The short identifier for your JIRA project, all uppercase, e.g., `PROJ`. |
...@@ -569,7 +637,7 @@ PUT /projects/:id/services/slack-slash-commands ...@@ -569,7 +637,7 @@ PUT /projects/:id/services/slack-slash-commands
Parameters: Parameters:
| Attribute | Type | Required | Description | | Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `token` | string | yes | The Slack token | | `token` | string | yes | The Slack token |
...@@ -604,7 +672,7 @@ PUT /projects/:id/services/mattermost-slash-commands ...@@ -604,7 +672,7 @@ PUT /projects/:id/services/mattermost-slash-commands
Parameters: Parameters:
| Attribute | Type | Required | Description | | Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `token` | string | yes | The Mattermost token | | `token` | string | yes | The Mattermost token |
| `username` | string | no | The username to use to post the message | | `username` | string | no | The username to use to post the message |
...@@ -665,7 +733,7 @@ PUT /projects/:id/services/pipelines-email ...@@ -665,7 +733,7 @@ PUT /projects/:id/services/pipelines-email
Parameters: Parameters:
| Attribute | Type | Required | Description | | Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `recipients` | string | yes | Comma-separated list of recipient email addresses | | `recipients` | string | yes | Comma-separated list of recipient email addresses |
| `add_pusher` | boolean | no | Add pusher to recipients list | | `add_pusher` | boolean | no | Add pusher to recipients list |
...@@ -701,8 +769,10 @@ PUT /projects/:id/services/pivotaltracker ...@@ -701,8 +769,10 @@ PUT /projects/:id/services/pivotaltracker
Parameters: Parameters:
- `token` (**required**) | Parameter | Type | Required | Description |
- `restrict_to_branch` (optional) - Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches. | --------- | ---- | -------- | ----------- |
| `token` | string | true | The PivotalTracker token |
| `restrict_to_branch` | boolean | false | Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches. |
### Delete PivotalTracker service ### Delete PivotalTracker service
...@@ -720,6 +790,40 @@ Get PivotalTracker service settings for a project. ...@@ -720,6 +790,40 @@ Get PivotalTracker service settings for a project.
GET /projects/:id/services/pivotaltracker GET /projects/:id/services/pivotaltracker
``` ```
## Prometheus
Prometheus is a powerful time-series monitoring service.
### Create/Edit Prometheus service
Set Prometheus service for a project.
```
PUT /projects/:id/services/prometheus
```
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `api_url` | string | true | Prometheus API Base URL, like http://prometheus.example.com/ |
### Delete Prometheus service
Delete Prometheus service for a project.
```
DELETE /projects/:id/services/prometheus
```
### Get Prometheus service settings
Get Prometheus service settings for a project.
```
GET /projects/:id/services/prometheus
```
## Pushover ## Pushover
Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop. Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop.
...@@ -734,11 +838,13 @@ PUT /projects/:id/services/pushover ...@@ -734,11 +838,13 @@ PUT /projects/:id/services/pushover
Parameters: Parameters:
- `api_key` (**required**) - Your application key | Parameter | Type | Required | Description |
- `user_key` (**required**) - Your user key | --------- | ---- | -------- | ----------- |
- `priority` (**required**) | `api_key` | string | true | Your application key |
- `device` (optional) - Leave blank for all active devices | `user_key` | string | true | Your user key |
- `sound` (optional) | `priority` | string | true | The priority |
| `device` | string | false | Leave blank for all active devices |
| `sound` | string | false | The sound of the notification |
### Delete Pushover service ### Delete Pushover service
...@@ -770,10 +876,12 @@ PUT /projects/:id/services/redmine ...@@ -770,10 +876,12 @@ PUT /projects/:id/services/redmine
Parameters: Parameters:
- `new_issue_url` (**required**) - New Issue url | Parameter | Type | Required | Description |
- `project_url` (**required**) - Project url | --------- | ---- | -------- | ----------- |
- `issues_url` (**required**) - Issue url | `new_issue_url` | string | true | New Issue url |
- `description` (optional) - Redmine issue tracker | `project_url` | string | true | Project url |
| `issues_url` | string | true | Issue url |
| `description` | string | false | Description |
### Delete Redmine service ### Delete Redmine service
...@@ -803,11 +911,33 @@ Set Slack service for a project. ...@@ -803,11 +911,33 @@ Set Slack service for a project.
PUT /projects/:id/services/slack PUT /projects/:id/services/slack
``` ```
>**Note:** Specific event parameters (e.g. `push_events` flag and `push_channel`) were [introduced in v10.4][11435]
Parameters: Parameters:
- `webhook` (**required**) - https://hooks.slack.com/services/... | Parameter | Type | Required | Description |
- `username` (optional) - username | --------- | ---- | -------- | ----------- |
- `channel` (optional) - #channel | `webhook` | string | true | https://hooks.slack.com/services/... |
| `username` | string | false | username |
| `channel` | string | false | Default channel to use if others are not configured |
| `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 |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events |
| `tag_push_events` | boolean | false | Enable notifications for tag push events |
| `note_events` | boolean | false | Enable notifications for note events |
| `pipeline_events` | boolean | false | Enable notifications for pipeline events |
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events |
| `push_channel` | string | false | The name of the channel to receive push events notifications |
| `issue_channel` | string | false | The name of the channel to receive issues events notifications |
| `confidential_issue_channel` | string | false | The name of the channel to receive confidential issues events notifications |
| `merge_request_channel` | string | false | The name of the channel to receive merge request events notifications |
| `note_channel` | string | false | The name of the channel to receive note events notifications |
| `tag_push_channel` | string | false | The name of the channel to receive tag push events notifications |
| `pipeline_channel` | string | false | The name of the channel to receive pipeline events notifications |
| `wiki_page_channel` | string | false | The name of the channel to receive wiki page events notifications |
### Delete Slack service ### Delete Slack service
...@@ -825,6 +955,40 @@ Get Slack service settings for a project. ...@@ -825,6 +955,40 @@ Get Slack service settings for a project.
GET /projects/:id/services/slack GET /projects/:id/services/slack
``` ```
## Microsoft Teams
Group Chat Software
### Create/Edit Microsoft Teams service
Set Microsoft Teams service for a project.
```
PUT /projects/:id/services/microsoft_teams
```
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `webhook` | string | true | The Microsoft Teams webhook. e.g. https://outlook.office.com/webhook/... |
### Delete Microsoft Teams service
Delete Microsoft Teams service for a project.
```
DELETE /projects/:id/services/microsoft_teams
```
### Get Microsoft Teams service settings
Get Microsoft Teams service settings for a project.
```
GET /projects/:id/services/microsoft_teams
```
## Mattermost notifications ## Mattermost notifications
Receive event notifications in Mattermost Receive event notifications in Mattermost
...@@ -837,11 +1001,33 @@ Set Mattermost service for a project. ...@@ -837,11 +1001,33 @@ Set Mattermost service for a project.
PUT /projects/:id/services/mattermost PUT /projects/:id/services/mattermost
``` ```
>**Note:** Specific event parameters (e.g. `push_events` flag and `push_channel`) were [introduced in v10.4][11435]
Parameters: Parameters:
- `webhook` (**required**) - https://mattermost.example/hooks/1298aff... | Parameter | Type | Required | Description |
- `username` (optional) - username | --------- | ---- | -------- | ----------- |
- `channel` (optional) - #channel | `webhook` | string | true | The Mattermost webhook. e.g. http://mattermost_host/hooks/... |
| `username` | string | false | username |
| `channel` | string | false | Default channel to use if others are not configured |
| `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 |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events |
| `tag_push_events` | boolean | false | Enable notifications for tag push events |
| `note_events` | boolean | false | Enable notifications for note events |
| `pipeline_events` | boolean | false | Enable notifications for pipeline events |
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events |
| `push_channel` | string | false | The name of the channel to receive push events notifications |
| `issue_channel` | string | false | The name of the channel to receive issues events notifications |
| `confidential_issue_channel` | string | false | The name of the channel to receive confidential issues events notifications |
| `merge_request_channel` | string | false | The name of the channel to receive merge request events notifications |
| `note_channel` | string | false | The name of the channel to receive note events notifications |
| `tag_push_channel` | string | false | The name of the channel to receive tag push events notifications |
| `pipeline_channel` | string | false | The name of the channel to receive pipeline events notifications |
| `wiki_page_channel` | string | false | The name of the channel to receive wiki page events notifications |
### Delete Mattermost notifications service ### Delete Mattermost notifications service
...@@ -875,10 +1061,12 @@ PUT /projects/:id/services/teamcity ...@@ -875,10 +1061,12 @@ PUT /projects/:id/services/teamcity
Parameters: Parameters:
- `teamcity_url` (**required**) - TeamCity root URL like https://teamcity.example.com | Parameter | Type | Required | Description |
- `build_type` (**required**) - Build configuration ID | --------- | ---- | -------- | ----------- |
- `username` (**required**) - A user with permissions to trigger a manual build | `teamcity_url` | string | true | TeamCity root URL like https://teamcity.example.com |
- `password` (**required**) | `build_type` | string | true | Build configuration ID |
| `username` | string | true | A user with permissions to trigger a manual build |
| `password` | string | true | The password of the user |
### Delete JetBrains TeamCity CI service ### Delete JetBrains TeamCity CI service
...@@ -916,7 +1104,9 @@ PUT /projects/:id/services/mock-ci ...@@ -916,7 +1104,9 @@ PUT /projects/:id/services/mock-ci
Parameters: Parameters:
- `mock_service_url` (**required**) - http://localhost:4004 | Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `mock_service_url` | string | true | http://localhost:4004 |
### Delete MockCI service ### Delete MockCI service
...@@ -933,3 +1123,5 @@ Get MockCI service settings for a project. ...@@ -933,3 +1123,5 @@ Get MockCI service settings for a project.
``` ```
GET /projects/:id/services/mock-ci GET /projects/:id/services/mock-ci
``` ```
[11435]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11435
...@@ -708,8 +708,9 @@ module API ...@@ -708,8 +708,9 @@ module API
class ProjectService < Grape::Entity class ProjectService < Grape::Entity
expose :id, :title, :created_at, :updated_at, :active expose :id, :title, :created_at, :updated_at, :active
expose :push_events, :issues_events, :merge_requests_events expose :push_events, :issues_events, :confidential_issues_events
expose :tag_push_events, :note_events, :pipeline_events expose :merge_requests_events, :tag_push_events, :note_events
expose :pipeline_events, :wiki_page_events
expose :job_events expose :job_events
# Expose serialized properties # Expose serialized properties
expose :properties do |service, options| expose :properties do |service, options|
......
module API module API
class Services < Grape::API class Services < Grape::API
chat_notification_settings = [
{
required: true,
name: :webhook,
type: String,
desc: 'The chat webhook'
},
{
required: false,
name: :username,
type: String,
desc: 'The chat username'
},
{
required: false,
name: :channel,
type: String,
desc: 'The default chat channel'
}
]
chat_notification_flags = [
{
required: false,
name: :notify_only_broken_pipelines,
type: Boolean,
desc: 'Send notifications for broken pipelines'
},
{
required: false,
name: :notify_only_default_branch,
type: Boolean,
desc: 'Send notifications only for the default branch'
}
]
chat_notification_channels = [
{
required: false,
name: :push_channel,
type: String,
desc: 'The name of the channel to receive push_events notifications'
},
{
required: false,
name: :issue_channel,
type: String,
desc: 'The name of the channel to receive issues_events notifications'
},
{
required: false,
name: :confidential_issue_channel,
type: String,
desc: 'The name of the channel to receive confidential_issues_events notifications'
},
{
required: false,
name: :merge_request_channel,
type: String,
desc: 'The name of the channel to receive merge_requests_events notifications'
},
{
required: false,
name: :note_channel,
type: String,
desc: 'The name of the channel to receive note_events notifications'
},
{
required: false,
name: :tag_push_channel,
type: String,
desc: 'The name of the channel to receive tag_push_events notifications'
},
{
required: false,
name: :pipeline_channel,
type: String,
desc: 'The name of the channel to receive pipeline_events notifications'
},
{
required: false,
name: :wiki_page_channel,
type: String,
desc: 'The name of the channel to receive wiki_page_events notifications'
}
]
chat_notification_events = [
{
required: false,
name: :push_events,
type: Boolean,
desc: 'Enable notifications for push_events'
},
{
required: false,
name: :issues_events,
type: Boolean,
desc: 'Enable notifications for issues_events'
},
{
required: false,
name: :confidential_issues_events,
type: Boolean,
desc: 'Enable notifications for confidential_issues_events'
},
{
required: false,
name: :merge_requests_events,
type: Boolean,
desc: 'Enable notifications for merge_requests_events'
},
{
required: false,
name: :note_events,
type: Boolean,
desc: 'Enable notifications for note_events'
},
{
required: false,
name: :tag_push_events,
type: Boolean,
desc: 'Enable notifications for tag_push_events'
},
{
required: false,
name: :pipeline_events,
type: Boolean,
desc: 'Enable notifications for pipeline_events'
},
{
required: false,
name: :wiki_page_events,
type: Boolean,
desc: 'Enable notifications for wiki_page_events'
}
]
services = { services = {
'asana' => [ 'asana' => [
{ {
...@@ -489,25 +627,11 @@ module API ...@@ -489,25 +627,11 @@ module API
} }
], ],
'slack' => [ 'slack' => [
{ chat_notification_settings,
required: true, chat_notification_flags,
name: :webhook, chat_notification_channels,
type: String, chat_notification_events
desc: 'The Slack webhook. e.g. https://hooks.slack.com/services/...' ].flatten,
},
{
required: false,
name: :new_issue_url,
type: String,
desc: 'The user name'
},
{
required: false,
name: :channel,
type: String,
desc: 'The channel name'
}
],
'microsoft-teams' => [ 'microsoft-teams' => [
{ {
required: true, required: true,
...@@ -517,19 +641,11 @@ module API ...@@ -517,19 +641,11 @@ module API
} }
], ],
'mattermost' => [ 'mattermost' => [
{ chat_notification_settings,
required: true, chat_notification_flags,
name: :webhook, chat_notification_channels,
type: String, chat_notification_events
desc: 'The Mattermost webhook. e.g. http://mattermost_host/hooks/...' ].flatten,
},
{
required: false,
name: :username,
type: String,
desc: 'The username to use to post the message'
}
],
'teamcity' => [ 'teamcity' => [
{ {
required: true, required: true,
......
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