Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Fix support for the GitLab Slack App #2039

Closed
jgangemi opened this issue Oct 15, 2024 · 1 comment · Fixed by #2042
Closed

Fix support for the GitLab Slack App #2039

jgangemi opened this issue Oct 15, 2024 · 1 comment · Fixed by #2042

Comments

@jgangemi
Copy link
Contributor

jgangemi commented Oct 15, 2024

The current implementation does not support the json data structure returned from the PUT and GET operations.

Sample JSON from a GET call using:

curl -s -X GET --header "PRIVATE-TOKEN: <token>" https://gitlab.com/api/v4/projects/<project-id>/integrations/gitlab-slack-application
{
  "id": 12345,
  "title": "GitLab for Slack app",
  "slug": "gitlab-slack-application",
  "created_at": "2024-10-15T01:57:19.376Z",
  "updated_at": "2024-10-15T13:28:48.228Z",
  "active": true,
  "commit_events": false,
  "push_events": false,
  "issues_events": false,
  "incident_events": false,
  "alert_events": true,
  "confidential_issues_events": false,
  "merge_requests_events": false,
  "tag_push_events": false,
  "deployment_events": false,
  "note_events": false,
  "confidential_note_events": false,
  "pipeline_events": false,
  "wiki_page_events": false,
  "job_events": false,
  "comment_on_event_enabled": true,
  "inherited": false,
  "vulnerability_events": false,
  "properties": {
    "channel": null,
    "notify_only_broken_pipelines": true,
    "branches_to_be_notified": "default",
    "labels_to_be_notified": "",
    "labels_to_be_notified_behavior": "match_any",
    "push_channel": "",
    "issue_channel": "",
    "confidential_issue_channel": "",
    "merge_request_channel": "",
    "note_channel": "",
    "confidential_note_channel": "",
    "tag_push_channel": "",
    "pipeline_channel": "",
    "wiki_page_channel": "",
    "deployment_channel": "",
    "incident_channel": "",
    "vulnerability_channel": "",
    "alert_channel": ""
  }
}

All of the boolean values aside from notify_only_broken_pipelines are already defined on the Service struct. the current SlackApplicationProperties just redeclares all the boolean properties and the SetSlackApplicationOptions doesn't declare almost all of what's in the properties attribute.

@svanharmelen
Copy link
Member

I think #2042 should fix this issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants