emails-on-push service endpoint returns `true` for non-enabled events

Summary

emails-on-push service endpoint returns true for non-enabled events

Steps to reproduce

curl -s --header "PRIVATE-TOKEN: $GITLAB_TOKEN" https://gitlab.com/api/v4/projects/foo%2fbar/services/emails-on-push | jq

What is the current bug behavior?

{
  "id": 40813123,
  "title": "Emails on push",
  "created_at": "2018-05-13T03:08:07.943Z",
  "updated_at": "2019-02-28T01:46:24.208Z",
  "active": true,
  "push_events": true,
  "issues_events": true,
  "confidential_issues_events": true,
  "merge_requests_events": true,
  "tag_push_events": false,
  "note_events": true,
  "confidential_note_events": true,
  "pipeline_events": true,
  "wiki_page_events": true,
  "job_events": true,
  "properties": {
    "send_from_committer_email": null,
    "disable_diffs": null,
    "recipients": "me@localhost.local"
  }
}

What is the expected correct behavior?

{
  "id": 40813123,
  "title": "Emails on push",
  "created_at": "2018-05-13T03:08:07.943Z",
  "updated_at": "2019-02-28T01:46:24.208Z",
  "active": true,
  "push_events": true,
  "issues_events": false,
  "confidential_issues_events": false,
  "merge_requests_events": false,
  "tag_push_events": false,
  "note_events": false,
  "confidential_note_events": false,
  "pipeline_events": false,
  "wiki_page_events": false,
  "job_events": false,
  "properties": {
    "send_from_committer_email": null,
    "disable_diffs": null,
    "recipients": "me@localhost.local"
  }
}

/label services-api

Edited Feb 28, 2019 by Raphaël Droz
Assignee Loading
Time tracking Loading