Skip to content

Add feature to update flags for services like Slack, Emails on Push through API

Description

Problem: Currently we cannot update whether I need notification for push or a merge request or something else.

Use cases: We want to build an entire repository from APIs. For that we need to configure notifications and integrations like Slack/ email on push. We want to enable/disable certain components like push/merge request/merge flags through API.

Benefits: It will have more independence to update a setting of a service integration.

Proposal

Can we have more parameters in PUT method while updating an integration service. eg:

PUT /projects/:id/services/slack
body: {
    "active": true,
    "push_events": true,
    "issues_events": true,
    "merge_requests_events": true,
    "tag_push_events": true,
    "note_events": true,
    "pipeline_events": true,
    "build_events": true,
    "properties": {
        "webhook": "https://hooks.slack.com/services/T.....",
        "notify_only_broken_pipelines": true,
        "notify_only_default_branch": true
    }
}

Links / references

https://cimpress.githost.io/help/api/services.md#slack-notifications

Edited by Arturo Herrero