Skip to content

Add pipelineTriggersDelete GraphQL mutation

What does this MR do and why?

Part of #346054 (closed)

This MR adds a new mutation to DELETE a pipelineTrigger.

🚨 Note: This MR is dependent on and to be merged after: !126537 (merged) - because this MR is on the community fork, I can't set the upstream branch to md-update-pipeline-trigger, but we can view the compared branches HERE instead. Hopefully that makes reviewing and locating only the newly changed files a bit easier!

Related MRs:

Screenshots or screen recordings

pipelines before running delete mutation

after_update_-_before_delete

running the delete mutation

delete

after running the delete mutation - note the trigger is gone!

after-delete

How to set up and validate locally

  1. Run gdk/gitpod server
  2. Visit http://127.0.0.1:3000/-/graphql-explorer
  3. Query all triggers for a project, copy the gid of any trigger you'd like
query {
  project(fullPath: "gitlab-org/gitlab-shell") {
    pipelineTriggers {
      edges {
        node {
          id
          description
        }
      }
    }
  }
}
  1. Run a delete mutation on the trigger whose gid you copied
mutation {
  pipelineTriggerDelete(
    input: {id: "gid://gitlab/Ci::Trigger/10"}
  ) {
    errors
  }
}
  1. Query all triggers again and verify the trigger was deleted

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Missy Davies

Merge request reports