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.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Enable the feature flag locally in a rails console
bin/rails c
:Feature.enable(:create_runner_workflow_for_admin)
-
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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Pedro Pombeiro