Skip to content
Snippets Groups Projects
Commit 539581af authored by Vojko Pribudić's avatar Vojko Pribudić Committed by Andy Schoenen
Browse files

Add Pumble integration

Changelog: added
parent 9a8c73a7
No related branches found
No related tags found
2 merge requests!96059Draft: Add GraphQL query for deployment details,!93623Add Pumble integration
Showing
with 286 additions and 1 deletion
......@@ -118,6 +118,7 @@ Style/FormatString:
- 'app/models/integrations/mattermost.rb'
- 'app/models/integrations/pipelines_email.rb'
- 'app/models/integrations/pivotaltracker.rb'
- 'app/models/integrations/pumble.rb'
- 'app/models/integrations/pushover.rb'
- 'app/models/integrations/redmine.rb'
- 'app/models/integrations/unify_circuit.rb'
......
......@@ -21,7 +21,7 @@ class Integration < ApplicationRecord
asana assembla bamboo bugzilla buildkite campfire confluence custom_issue_tracker datadog discord
drone_ci emails_on_push ewm external_wiki flowdock hangouts_chat harbor irker jira
mattermost mattermost_slash_commands microsoft_teams packagist pipelines_email
pivotaltracker prometheus pushover redmine slack slack_slash_commands teamcity unify_circuit webex_teams youtrack zentao
pivotaltracker prometheus pumble pushover redmine slack slack_slash_commands teamcity unify_circuit webex_teams youtrack zentao
].freeze
# TODO Shimo is temporary disabled on group and instance-levels.
......
# frozen_string_literal: true
module Integrations
class Pumble < BaseChatNotification
def title
'Pumble'
end
def description
s_("PumbleIntegration|Send notifications about project events to Pumble.")
end
def self.to_param
'pumble'
end
def help
docs_link = ActionController::Base.helpers.link_to(
_('Learn more.'),
Rails.application.routes.url_helpers.help_page_url('user/project/integrations/pumble'),
target: '_blank',
rel: 'noopener noreferrer'
)
# rubocop:disable Layout/LineLength
s_("PumbleIntegration|Send notifications about project events to Pumble. %{docs_link}") % { docs_link: docs_link.html_safe }
# rubocop:enable Layout/LineLength
end
def default_channel_placeholder
end
def self.supported_events
%w[push issue confidential_issue merge_request note confidential_note tag_push
pipeline wiki_page]
end
def default_fields
[
{ type: 'text', name: 'webhook', placeholder: "https://api.pumble.com/workspaces/x/...", required: true },
{ type: 'checkbox', name: 'notify_only_broken_pipelines' },
{
type: 'select',
name: 'branches_to_be_notified',
title: s_('Integrations|Branches for which notifications are to be sent'),
choices: self.class.branch_choices
}
]
end
private
def notify(message, opts)
header = { 'Content-Type' => 'application/json' }
response = Gitlab::HTTP.post(webhook, headers: header, body: { text: message.summary }.to_json)
response if response.success?
end
end
end
......@@ -216,6 +216,7 @@ def self.integration_association_name(name)
has_one :pipelines_email_integration, class_name: 'Integrations::PipelinesEmail'
has_one :pivotaltracker_integration, class_name: 'Integrations::Pivotaltracker'
has_one :prometheus_integration, class_name: 'Integrations::Prometheus', inverse_of: :project
has_one :pumble_integration, class_name: 'Integrations::Pumble'
has_one :pushover_integration, class_name: 'Integrations::Pushover'
has_one :redmine_integration, class_name: 'Integrations::Redmine'
has_one :shimo_integration, class_name: 'Integrations::Shimo'
......
---
data_category: optional
key_path: counts.groups_inheriting_pumble_active
description: Count of active groups inheriting integrations for Pumble
product_section: dev
product_stage: ecosystem
product_group: integrations
product_category: integrations
value_type: number
status: active
time_frame: all
data_source: database
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
performance_indicator_type: []
milestone: "15.3"
---
data_category: optional
key_path: counts.groups_pumble_active
description: Count of groups with active integrations for Pumble
product_section: dev
product_stage: ecosystem
product_group: integrations
product_category: integrations
value_type: number
status: active
time_frame: all
data_source: database
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
performance_indicator_type: []
milestone: "15.3"
---
data_category: optional
key_path: counts.instances_pumble_active
description: Count of active instance-level integrations for Pumble
product_section: dev
product_stage: ecosystem
product_group: integrations
product_category: integrations
value_type: number
status: active
time_frame: all
data_source: database
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
performance_indicator_type: []
milestone: "15.3"
---
data_category: optional
key_path: counts.projects_inheriting_pumble_active
description: Count of active projects inheriting integrations for Pumble
product_section: dev
product_stage: ecosystem
product_group: integrations
product_category: integrations
value_type: number
status: active
time_frame: all
data_source: database
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
performance_indicator_type: []
milestone: "15.3"
---
data_category: optional
key_path: counts.projects_pumble_active
description: Count of projects with active integrations for Pumble
product_section: dev
product_stage: ecosystem
product_group: integrations
product_category: integrations
value_type: number
status: active
time_frame: all
data_source: database
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
performance_indicator_type: []
milestone: "15.3"
......@@ -38,6 +38,7 @@ classes:
- Integrations::PipelinesEmail
- Integrations::Pivotaltracker
- Integrations::Prometheus
- Integrations::Pumble
- Integrations::Pushover
- Integrations::Redmine
- Integrations::Shimo
......
......@@ -20380,6 +20380,7 @@ State of a Sentry error.
| <a id="servicetypepipelines_email_service"></a>`PIPELINES_EMAIL_SERVICE` | PipelinesEmailService type. |
| <a id="servicetypepivotaltracker_service"></a>`PIVOTALTRACKER_SERVICE` | PivotaltrackerService type. |
| <a id="servicetypeprometheus_service"></a>`PROMETHEUS_SERVICE` | PrometheusService type. |
| <a id="servicetypepumble_service"></a>`PUMBLE_SERVICE` | PumbleService type. |
| <a id="servicetypepushover_service"></a>`PUSHOVER_SERVICE` | PushoverService type. |
| <a id="servicetyperedmine_service"></a>`REDMINE_SERVICE` | RedmineService type. |
| <a id="servicetypeshimo_service"></a>`SHIMO_SERVICE` | ShimoService type. |
......@@ -383,6 +383,51 @@ Get Unify Circuit integration settings for a project.
GET /projects/:id/integrations/unify-circuit
```
## Pumble
Pumble chat tool.
### Create/Edit Pumble integration
Set Pumble integration for a project.
```plaintext
PUT /projects/:id/integrations/pumble
```
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `webhook` | string | true | The Pumble webhook. For example, `https://api.pumble.com/workspaces/x/...`. |
| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default is `default`. |
| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events. |
| `confidential_note_events` | boolean | false | Enable notifications for confidential note events. |
| `issues_events` | boolean | false | Enable notifications for issue events. |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events. |
| `note_events` | boolean | false | Enable notifications for note events. |
| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines. |
| `pipeline_events` | boolean | false | Enable notifications for pipeline events. |
| `push_events` | boolean | false | Enable notifications for push events. |
| `tag_push_events` | boolean | false | Enable notifications for tag push events. |
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events. |
### Disable Pumble integration
Disable the Pumble integration for a project. Integration settings are preserved.
```plaintext
DELETE /projects/:id/integrations/pumble
```
### Get Pumble integration settings
Get Pumble integration settings for a project.
```plaintext
GET /projects/:id/integrations/pumble
```
## Webex Teams
Webex Teams collaboration tool.
......
......@@ -73,6 +73,7 @@ You can configure the following integrations.
| [Pipelines emails](pipeline_status_emails.md) | Send the pipeline status to a list of recipients by email. | **{dotted-circle}** No |
| [Pivotal Tracker](pivotal_tracker.md) | Add commit messages as comments to Pivotal Tracker stories. | **{dotted-circle}** No |
| [Prometheus](prometheus.md) | Monitor application metrics. | **{dotted-circle}** No |
| [Pumble](pumble.md) | Send event notifications to a Pumble channel. | **{dotted-circle}** No |
| Pushover | Get real-time notifications on your device. | **{dotted-circle}** No |
| [Redmine](redmine.md) | Use Redmine as the issue tracker. | **{dotted-circle}** No |
| [Slack application](gitlab_slack_application.md) | Use Slack's official GitLab application. | **{dotted-circle}** No |
......
---
stage: Ecosystem
group: Integrations
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# Pumble **(FREE)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/93623) in GitLab 15.3.
You can configure GitLab to send notifications to a Pumble channel:
1. Create a webhook for the channel.
1. Add the webhook to GitLab.
## Create a webhook for your Pumble channel
1. Follow the steps in [Incoming Webhooks for Pumble](https://pumble.com/help/integrations/custom-apps/incoming-webhooks-for-pumble/) in the Pumble documentation.
1. Copy the webhook URL.
## Configure settings in GitLab
After you have a webhook URL for your Pumble channel, configure GitLab to send
notifications:
1. To enable the integration for your group or project:
1. In your group or project, on the left sidebar, select **Settings > Integrations**.
1. To enable the integration for your instance:
1. On the top bar, select **Menu > Admin**.
1. On the left sidebar, select **Settings > Integrations**.
1. Select the **Pumble** integration.
1. Ensure that the **Active** toggle is enabled.
1. Select the checkboxes corresponding to the GitLab events you want to receive in Pumble.
1. Paste the **Webhook** URL for the Pumble channel.
1. Configure the remaining options.
1. Optional. To test the integration, select **Test settings**.
1. Select **Save changes**.
The Pumble channel begins to receive all applicable GitLab events.
......@@ -678,6 +678,15 @@ def self.integrations
desc: 'Contents of the credentials.json file of your service account, like: { "type": "service_account", "project_id": ... }'
}
],
'pumble' => [
{
required: true,
name: :webhook,
type: String,
desc: 'The Pumble chat webhook. For example, https://api.pumble.com/workspaces/x/...'
},
chat_notification_events
].flatten,
'pushover' => [
{
required: true,
......
......@@ -31879,6 +31879,12 @@ msgstr ""
msgid "Puma is running with a thread count above 1 and the Rugged service is enabled. This may decrease performance in some environments. See our %{link_start}documentation%{link_end} for details of this issue."
msgstr ""
 
msgid "PumbleIntegration|Send notifications about project events to Pumble."
msgstr ""
msgid "PumbleIntegration|Send notifications about project events to Pumble. %{docs_link}"
msgstr ""
msgid "Purchase more minutes"
msgstr ""
 
......@@ -35,6 +35,7 @@ def core_service_enums
PIPELINES_EMAIL_SERVICE
PIVOTALTRACKER_SERVICE
PROMETHEUS_SERVICE
PUMBLE_SERVICE
PUSHOVER_SERVICE
REDMINE_SERVICE
SHIMO_SERVICE
......
......@@ -597,6 +597,7 @@ project:
- alert_management_alerts
- repository_storage_moves
- freeze_periods
- pumble_integration
- webex_teams_integration
- build_report_results
- vulnerability_statistic
......
# frozen_string_literal: true
require "spec_helper"
RSpec.describe Integrations::Pumble do
it_behaves_like "chat integration", "Pumble" do
let(:client_arguments) { webhook_url }
let(:payload) do
{
text: be_present
}
end
end
end
......@@ -44,6 +44,7 @@
it { is_expected.to have_one(:mattermost_integration) }
it { is_expected.to have_one(:hangouts_chat_integration) }
it { is_expected.to have_one(:unify_circuit_integration) }
it { is_expected.to have_one(:pumble_integration) }
it { is_expected.to have_one(:webex_teams_integration) }
it { is_expected.to have_one(:packagist_integration) }
it { is_expected.to have_one(:pushover_integration) }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment