Skip to content

GraphQL: Add CiRunner.createdBy field

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR adds the createdBy field to the CiRunner type to expose the creator database field.

Closes #393868 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Enable the feature flag locally in a rails console bin/rails c:

    Feature.enable(:create_runner_workflow_for_admin)
  2. Visit http://gdk.test:3000/-/graphql-explorer

  3. Run this mutation:

    mutation runnerCreate($input: RunnerCreateInput!) {
      runnerCreate(input: $input) {
        runner {
          id
          ephemeralAuthenticationToken
          createdBy {
            id
            name
          }
        }
        errors
      }
    }

    and with the following query variables

    {
      "input": {
        "description": "my awesome description",
        "maintenanceNote": "often.",
        "paused": true
      }
    }

The resulting JSON should contain the details for your currently logged in user:

        "createdBy": {
          "id": "gid://gitlab/User/1",
          "name": "Administrator"
        }

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 Pedro Pombeiro

Merge request reports

Loading