Add save and update pipeline trigger mutations to GraphQL
Context
This issue is a prerequisite for #42742, which will move the pipeline trigger UI to Vue. Before that can be done, the backend needs to add the ability to save and update pipeline triggers.
Proposed solution
Add mutations that allow for saving and updating pipeline triggers to GraphQL.
Queries
Get all pipelineTriggers
{
project(fullPath: "cool-project") {
ciCdSettings {
pipelineTriggers {
id
token
hasTokenExposed
canAccessProject
description
owner
lastUsed
}
}
}
}
Mutations
Add
{
projectPipelineTriggerAddTrigger(projectPath: $path, input: CiCdPipelineTriggerInput) {
errors
...Trigger,
}
}
Update
{
projectPipelineTriggerUpdateTrigger(projectPath: $path, input: CiCdPipelineTriggerInput) {
errors,
...Trigger,
}
}
Delete
{
projectPipelineTriggerRemoveTrigger(projectPath: $path, id: $id) {
errors
...Trigger,
}
}
Edited by Jose Ivan Vargas