Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ddffb972
Commit
ddffb972
authored
Apr 20, 2021
by
pburdette
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing data to CiJob type
Add missing data for a refactor to the ci job type graphql. Changelog: added
parent
41d18ebb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
0 deletions
+29
-0
app/graphql/types/ci/job_type.rb
app/graphql/types/ci/job_type.rb
+18
-0
changelogs/unreleased/pb-add-missing-data-to-ci-job-type.yml
changelogs/unreleased/pb-add-missing-data-to-ci-job-type.yml
+5
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+3
-0
spec/graphql/types/ci/job_type_spec.rb
spec/graphql/types/ci/job_type_spec.rb
+3
-0
No files found.
app/graphql/types/ci/job_type.rb
View file @
ddffb972
...
...
@@ -65,6 +65,12 @@ module Types
description:
'Indicates the job is active.'
field
:coverage
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
description:
'Coverage level of the job.'
field
:created_by_tag
,
GraphQL
::
BOOLEAN_TYPE
,
null:
false
,
description:
'Whether the job was created by a tag.'
field
:manual_job
,
GraphQL
::
BOOLEAN_TYPE
,
null:
true
,
description:
'Whether the job has a manual action.'
field
:triggered
,
GraphQL
::
BOOLEAN_TYPE
,
null:
true
,
description:
'Whether the job was triggered.'
def
pipeline
Gitlab
::
Graphql
::
Loaders
::
BatchModelLoader
.
new
(
::
Ci
::
Pipeline
,
object
.
pipeline_id
).
find
...
...
@@ -123,6 +129,18 @@ module Types
def
coverage
object
&
.
coverage
end
def
created_by_tag
object
.
tag?
end
def
manual_job
object
.
try
(
:action?
)
end
def
triggered
object
.
try
(
:trigger_request
)
end
end
end
end
changelogs/unreleased/pb-add-missing-data-to-ci-job-type.yml
0 → 100644
View file @
ddffb972
---
title
:
Add missing data to CiJob type
merge_request
:
59805
author
:
type
:
added
doc/api/graphql/reference/index.md
View file @
ddffb972
...
...
@@ -7075,10 +7075,12 @@ Represents the total number of issues and their weights for a particular day.
|
<a
id=
"cijobcommitpath"
></a>
`commitPath`
|
[
`String`
](
#string
)
| Path to the commit that triggered the job. |
|
<a
id=
"cijobcoverage"
></a>
`coverage`
|
[
`Float`
](
#float
)
| Coverage level of the job. |
|
<a
id=
"cijobcreatedat"
></a>
`createdAt`
|
[
`Time!`
](
#time
)
| When the job was created. |
|
<a
id=
"cijobcreatedbytag"
></a>
`createdByTag`
|
[
`Boolean!`
](
#boolean
)
| Whether the job was created by a tag. |
|
<a
id=
"cijobdetailedstatus"
></a>
`detailedStatus`
|
[
`DetailedStatus`
](
#detailedstatus
)
| Detailed status of the job. |
|
<a
id=
"cijobduration"
></a>
`duration`
|
[
`Int`
](
#int
)
| Duration of the job in seconds. |
|
<a
id=
"cijobfinishedat"
></a>
`finishedAt`
|
[
`Time`
](
#time
)
| When a job has finished running. |
|
<a
id=
"cijobid"
></a>
`id`
|
[
`JobID`
](
#jobid
)
| ID of the job. |
|
<a
id=
"cijobmanualjob"
></a>
`manualJob`
|
[
`Boolean`
](
#boolean
)
| Whether the job has a manual action. |
|
<a
id=
"cijobname"
></a>
`name`
|
[
`String`
](
#string
)
| Name of the job. |
|
<a
id=
"cijobneeds"
></a>
`needs`
|
[
`CiBuildNeedConnection`
](
#cibuildneedconnection
)
| References to builds that must complete before the jobs run. |
|
<a
id=
"cijobpipeline"
></a>
`pipeline`
|
[
`Pipeline`
](
#pipeline
)
| Pipeline the job belongs to. |
...
...
@@ -7094,6 +7096,7 @@ Represents the total number of issues and their weights for a particular day.
|
<a
id=
"cijobstartedat"
></a>
`startedAt`
|
[
`Time`
](
#time
)
| When the job was started. |
|
<a
id=
"cijobstatus"
></a>
`status`
|
[
`CiJobStatus`
](
#cijobstatus
)
| Status of the job. |
|
<a
id=
"cijobtags"
></a>
`tags`
|
[
`[String!]`
](
#string
)
| Tags for the current job. |
|
<a
id=
"cijobtriggered"
></a>
`triggered`
|
[
`Boolean`
](
#boolean
)
| Whether the job was triggered. |
### `CiJobArtifact`
...
...
spec/graphql/types/ci/job_type_spec.rb
View file @
ddffb972
...
...
@@ -15,10 +15,12 @@ RSpec.describe Types::Ci::JobType do
commitPath
coverage
created_at
created_by_tag
detailedStatus
duration
finished_at
id
manual_job
name
needs
pipeline
...
...
@@ -34,6 +36,7 @@ RSpec.describe Types::Ci::JobType do
started_at
status
tags
triggered
]
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment