Skip to content

Allow updating the shared runners setting via GraphQL

mo khan requested to merge mokhax/442851/graphql-group-update into master

What does this MR do and why?

This change allows users that belong to a custom role with the admin_runners permission enabled to be able to execute the Mutation.groupUpdate GraphQL Mutation in order to change the shared_runners_setting on the target group.

#442851

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
Before After

How to set up and validate locally

  1. In rails console enable the experiment fully
    Feature.enable(:custom_ability_admin_runners)
  2. Visit the GraphQL Explorer at http://127.0.0.1:3000-/graphql-explorer
  3. Execute the Mutation.groupUpdate Mutation to change the sharedRunnersSetting
mutation updateGroup($fullPath: ID!){
  groupUpdate(input: {fullPath: $fullPath, sharedRunnersSetting: DISABLED_AND_OVERRIDABLE}) {
    errors
    group{
      id
      sharedRunnersSetting
    }
  }
}
Edited by mo khan

Merge request reports