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
9c103924
Commit
9c103924
authored
Oct 12, 2020
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated fields
- According to GraphQL deprecation process
parent
825d5232
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
7 additions
and
214 deletions
+7
-214
app/graphql/types/commit_type.rb
app/graphql/types/commit_type.rb
+0
-7
app/graphql/types/grafana_integration_type.rb
app/graphql/types/grafana_integration_type.rb
+0
-8
app/graphql/types/issue_type.rb
app/graphql/types/issue_type.rb
+0
-5
app/graphql/types/merge_request_type.rb
app/graphql/types/merge_request_type.rb
+0
-3
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+0
-45
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+0
-121
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+0
-6
ee/app/graphql/types/timelog_type.rb
ee/app/graphql/types/timelog_type.rb
+0
-7
ee/spec/graphql/types/timelog_type_spec.rb
ee/spec/graphql/types/timelog_type_spec.rb
+1
-1
ee/spec/requests/api/graphql/group/timelogs_spec.rb
ee/spec/requests/api/graphql/group/timelogs_spec.rb
+1
-4
spec/graphql/types/commit_type_spec.rb
spec/graphql/types/commit_type_spec.rb
+1
-1
spec/graphql/types/grafana_integration_type_spec.rb
spec/graphql/types/grafana_integration_type_spec.rb
+0
-1
spec/graphql/types/issue_type_spec.rb
spec/graphql/types/issue_type_spec.rb
+1
-1
spec/graphql/types/merge_request_type_spec.rb
spec/graphql/types/merge_request_type_spec.rb
+1
-1
spec/requests/api/graphql/project/grafana_integration_spec.rb
.../requests/api/graphql/project/grafana_integration_spec.rb
+0
-1
spec/requests/api/graphql/project/issue/designs/notes_spec.rb
.../requests/api/graphql/project/issue/designs/notes_spec.rb
+2
-2
No files found.
app/graphql/types/commit_type.rb
View file @
9c103924
...
...
@@ -44,12 +44,5 @@ module Types
null:
true
,
description:
'Pipelines of the commit ordered latest first'
,
resolver:
Resolvers
::
CommitPipelinesResolver
field
:latest_pipeline
,
type:
Types
::
Ci
::
PipelineType
,
null:
true
,
deprecated:
{
reason:
'Use `pipelines`'
,
milestone:
'12.5'
},
description:
'Latest pipeline of the commit'
,
resolver:
Resolvers
::
CommitPipelinesResolver
.
last
end
end
app/graphql/types/grafana_integration_type.rb
View file @
9c103924
...
...
@@ -16,13 +16,5 @@ module Types
description:
'Timestamp of the issue\'s creation'
field
:updated_at
,
Types
::
TimeType
,
null:
false
,
description:
'Timestamp of the issue\'s last activity'
field
:token
,
GraphQL
::
STRING_TYPE
,
null:
false
,
deprecated:
{
reason:
'Plain text token has been masked for security reasons'
,
milestone:
'12.7'
},
description:
'API token for the Grafana integration'
def
token
object
.
masked_token
end
end
end
app/graphql/types/issue_type.rb
View file @
9c103924
...
...
@@ -98,11 +98,6 @@ module Types
field
:task_completion_status
,
Types
::
TaskCompletionStatus
,
null:
false
,
description:
'Task completion status of the issue'
field
:designs
,
Types
::
DesignManagement
::
DesignCollectionType
,
null:
true
,
method: :design_collection
,
deprecated:
{
reason:
'Use `designCollection`'
,
milestone:
'12.2'
},
description:
'The designs associated with this issue'
field
:design_collection
,
Types
::
DesignManagement
::
DesignCollectionType
,
null:
true
,
description:
'Collection of design images associated with this issue'
...
...
app/graphql/types/merge_request_type.rb
View file @
9c103924
...
...
@@ -88,9 +88,6 @@ module Types
description:
'Rebase commit SHA of the merge request'
field
:rebase_in_progress
,
GraphQL
::
BOOLEAN_TYPE
,
method: :rebase_in_progress?
,
null:
false
,
calls_gitaly:
true
,
description:
'Indicates if there is a rebase currently in progress for the merge request'
field
:merge_commit_message
,
GraphQL
::
STRING_TYPE
,
method: :default_merge_commit_message
,
null:
true
,
deprecated:
{
reason:
'Use `defaultMergeCommitMessage`'
,
milestone:
'11.8'
},
description:
'Default merge commit message of the merge request'
field
:default_merge_commit_message
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
'Default merge commit message of the merge request'
field
:merge_ongoing
,
GraphQL
::
BOOLEAN_TYPE
,
method: :merge_ongoing?
,
null:
false
,
...
...
doc/api/graphql/reference/gitlab_schema.graphql
View file @
9c103924
...
...
@@ -2848,26 +2848,6 @@ type Commit {
"""
id
:
ID
!
"""
Latest
pipeline
of
the
commit
.
Deprecated
in
12.5
:
Use
`
pipelines
`
"""
latestPipeline
(
"""
Filter
pipelines
by
the
ref
they
are
run
for
"""
ref
:
String
"""
Filter
pipelines
by
the
sha
of
the
commit
they
are
run
for
"""
sha
:
String
"""
Filter
pipelines
by
their
status
"""
status
:
PipelineStatusEnum
):
Pipeline
@
deprecated
(
reason
:
"
Use
`
pipelines
`.
Deprecated
in
12.5"
)
"""
Raw
commit
message
"""
...
...
@@ -7710,11 +7690,6 @@ type EpicIssue implements CurrentUserTodos & Noteable {
"""
designCollection
:
DesignCollection
"""
The
designs
associated
with
this
issue
.
Deprecated
in
12.2
:
Use
`
designCollection
`
"""
designs
:
DesignCollection
@
deprecated
(
reason
:
"
Use
`
designCollection
`.
Deprecated
in
12.2"
)
"""
Indicates
discussion
is
locked
on
the
issue
"""
...
...
@@ -8488,11 +8463,6 @@ type GrafanaIntegration {
"""
id
:
ID
!
"""
API
token
for
the
Grafana
integration
.
Deprecated
in
12.7
:
Plain
text
token
has
been
masked
for
security
reasons
"""
token
:
String
!
@
deprecated
(
reason
:
"
Plain
text
token
has
been
masked
for
security
reasons
.
Deprecated
in
12.7"
)
"""
Timestamp
of
the
issue
'
s
last
activity
"""
...
...
@@ -10274,11 +10244,6 @@ type Issue implements CurrentUserTodos & Noteable {
"""
designCollection
:
DesignCollection
"""
The
designs
associated
with
this
issue
.
Deprecated
in
12.2
:
Use
`
designCollection
`
"""
designs
:
DesignCollection
@
deprecated
(
reason
:
"
Use
`
designCollection
`.
Deprecated
in
12.2"
)
"""
Indicates
discussion
is
locked
on
the
issue
"""
...
...
@@ -12392,11 +12357,6 @@ type MergeRequest implements CurrentUserTodos & Noteable {
last
:
Int
):
LabelConnection
"""
Default
merge
commit
message
of
the
merge
request
.
Deprecated
in
11.8
:
Use
`
defaultMergeCommitMessage
`
"""
mergeCommitMessage
:
String
@
deprecated
(
reason
:
"
Use
`
defaultMergeCommitMessage
`.
Deprecated
in
11.8"
)
"""
SHA
of
the
merge
request
commit
(
set
once
merged
)
"""
...
...
@@ -21134,11 +21094,6 @@ input Timeframe {
}
type
Timelog
{
"""
Timestamp
of
when
the
time
tracked
was
spent
at
.
Deprecated
in
12.10
:
Use
`
spentAt
`
"""
date
:
Time
!
@
deprecated
(
reason
:
"
Use
`
spentAt
`.
Deprecated
in
12.10"
)
"""
The
issue
that
logged
time
was
added
to
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
9c103924
...
...
@@ -7792,49 +7792,6 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "latestPipeline",
"description": "Latest pipeline of the commit. Deprecated in 12.5: Use `pipelines`",
"args": [
{
"name": "status",
"description": "Filter pipelines by their status",
"type": {
"kind": "ENUM",
"name": "PipelineStatusEnum",
"ofType": null
},
"defaultValue": null
},
{
"name": "ref",
"description": "Filter pipelines by the ref they are run for",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "sha",
"description": "Filter pipelines by the sha of the commit they are run for",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
}
],
"type": {
"kind": "OBJECT",
"name": "Pipeline",
"ofType": null
},
"isDeprecated": true,
"deprecationReason": "Use `pipelines`. Deprecated in 12.5"
},
{
"name": "message",
"description": "Raw commit message",
...
...
@@ -21405,20 +21362,6 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "designs",
"description": "The designs associated with this issue. Deprecated in 12.2: Use `designCollection`",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "DesignCollection",
"ofType": null
},
"isDeprecated": true,
"deprecationReason": "Use `designCollection`. Deprecated in 12.2"
},
{
"name": "discussionLocked",
"description": "Indicates discussion is locked on the issue",
...
...
@@ -23569,24 +23512,6 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "token",
"description": "API token for the Grafana integration. Deprecated in 12.7: Plain text token has been masked for security reasons",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": true,
"deprecationReason": "Plain text token has been masked for security reasons. Deprecated in 12.7"
},
{
"name": "updatedAt",
"description": "Timestamp of the issue's last activity",
...
...
@@ -28153,20 +28078,6 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "designs",
"description": "The designs associated with this issue. Deprecated in 12.2: Use `designCollection`",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "DesignCollection",
"ofType": null
},
"isDeprecated": true,
"deprecationReason": "Use `designCollection`. Deprecated in 12.2"
},
{
"name": "discussionLocked",
"description": "Indicates discussion is locked on the issue",
...
...
@@ -33988,20 +33899,6 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "mergeCommitMessage",
"description": "Default merge commit message of the merge request. Deprecated in 11.8: Use `defaultMergeCommitMessage`",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": true,
"deprecationReason": "Use `defaultMergeCommitMessage`. Deprecated in 11.8"
},
{
"name": "mergeCommitSha",
"description": "SHA of the merge request commit (set once merged)",
...
...
@@ -61431,24 +61328,6 @@
"name": "Timelog",
"description": null,
"fields": [
{
"name": "date",
"description": "Timestamp of when the time tracked was spent at. Deprecated in 12.10: Use `spentAt`",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Time",
"ofType": null
}
},
"isDeprecated": true,
"deprecationReason": "Use `spentAt`. Deprecated in 12.10"
},
{
"name": "issue",
"description": "The issue that logged time was added to",
doc/api/graphql/reference/index.md
View file @
9c103924
...
...
@@ -472,7 +472,6 @@ Represents the code coverage summary for a project.
|
`description`
| String | Description of the commit message |
|
`descriptionHtml`
| String | The GitLab Flavored Markdown rendering of
`description`
|
|
`id`
| ID! | ID (global ID) of the commit |
|
`latestPipeline`
**{warning-solid}**
| Pipeline |
**Deprecated:**
Use
`pipelines`
. Deprecated in 12.5 |
|
`message`
| String | Raw commit message |
|
`pipelines`
| PipelineConnection | Pipelines of the commit ordered latest first |
|
`sha`
| String! | SHA1 ID of the commit |
...
...
@@ -1288,7 +1287,6 @@ Relationship between an epic and an issue.
|
`description`
| String | Description of the issue |
|
`descriptionHtml`
| String | The GitLab Flavored Markdown rendering of
`description`
|
|
`designCollection`
| DesignCollection | Collection of design images associated with this issue |
|
`designs`
**{warning-solid}**
| DesignCollection |
**Deprecated:**
Use
`designCollection`
. Deprecated in 12.2 |
|
`discussionLocked`
| Boolean! | Indicates discussion is locked on the issue |
|
`discussions`
| DiscussionConnection! | All discussions on this noteable |
|
`downvotes`
| Int! | Number of downvotes the issue has received |
...
...
@@ -1397,7 +1395,6 @@ Autogenerated return type of EpicTreeReorder.
|
`enabled`
| Boolean! | Indicates whether Grafana integration is enabled |
|
`grafanaUrl`
| String! | URL for the Grafana host for the Grafana integration |
|
`id`
| ID! | Internal ID of the Grafana integration |
|
`token`
**{warning-solid}**
| String! |
**Deprecated:**
Plain text token has been masked for security reasons. Deprecated in 12.7 |
|
`updatedAt`
| Time! | Timestamp of the issue's last activity |
### Group
...
...
@@ -1558,7 +1555,6 @@ Represents a recorded measurement (object count) for the Admins.
|
`description`
| String | Description of the issue |
|
`descriptionHtml`
| String | The GitLab Flavored Markdown rendering of
`description`
|
|
`designCollection`
| DesignCollection | Collection of design images associated with this issue |
|
`designs`
**{warning-solid}**
| DesignCollection |
**Deprecated:**
Use
`designCollection`
. Deprecated in 12.2 |
|
`discussionLocked`
| Boolean! | Indicates discussion is locked on the issue |
|
`discussions`
| DiscussionConnection! | All discussions on this noteable |
|
`downvotes`
| Int! | Number of downvotes the issue has received |
...
...
@@ -1879,7 +1875,6 @@ Autogenerated return type of MarkAsSpamSnippet.
|
`iid`
| String! | Internal ID of the merge request |
|
`inProgressMergeCommitSha`
| String | Commit SHA of the merge request if merge is in progress |
|
`labels`
| LabelConnection | Labels of the merge request |
|
`mergeCommitMessage`
**{warning-solid}**
| String |
**Deprecated:**
Use
`defaultMergeCommitMessage`
. Deprecated in 11.8 |
|
`mergeCommitSha`
| String | SHA of the merge request commit (set once merged) |
|
`mergeError`
| String | Error message due to a merge error |
|
`mergeOngoing`
| Boolean! | Indicates if a merge is currently occurring |
...
...
@@ -3129,7 +3124,6 @@ Represents a historically accurate report about the timebox.
| Field | Type | Description |
| ----- | ---- | ----------- |
|
`date`
**{warning-solid}**
| Time! |
**Deprecated:**
Use
`spentAt`
. Deprecated in 12.10 |
|
`issue`
| Issue | The issue that logged time was added to |
|
`note`
| Note | The note where the quick action to add the logged time was executed |
|
`spentAt`
| Time | Timestamp of when the time tracked was spent at |
...
...
ee/app/graphql/types/timelog_type.rb
View file @
9c103924
...
...
@@ -6,13 +6,6 @@ module Types
authorize
:read_group_timelogs
field
:date
,
Types
::
TimeType
,
null:
false
,
method: :spent_at
,
deprecated:
{
reason:
'Use `spentAt`'
,
milestone:
'12.10'
},
description:
'Timestamp of when the time tracked was spent at'
field
:spent_at
,
Types
::
TimeType
,
null:
true
,
...
...
ee/spec/graphql/types/timelog_type_spec.rb
View file @
9c103924
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
RSpec
.
describe
GitlabSchema
.
types
[
'Timelog'
]
do
let
(
:fields
)
{
%i[
date
spent_at time_spent user issue note]
}
let
(
:fields
)
{
%i[spent_at time_spent user issue note]
}
it
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'Timelog'
)
}
it
{
expect
(
described_class
).
to
have_graphql_fields
(
fields
)
}
...
...
ee/spec/requests/api/graphql/group/timelogs_spec.rb
View file @
9c103924
...
...
@@ -36,9 +36,8 @@ RSpec.describe 'Timelogs through GroupQuery' do
expect
(
graphql_data
[
'group'
][
'groupTimelogsEnabled'
]).
to
be_truthy
end
it
'contains correct data'
do
it
'contains correct data'
,
:aggregate_failures
do
username
=
timelog_array
.
map
{
|
data
|
data
[
'user'
][
'username'
]
}
date
=
timelog_array
.
map
{
|
data
|
data
[
'date'
].
to_time
}
spent_at
=
timelog_array
.
map
{
|
data
|
data
[
'spentAt'
].
to_time
}
time_spent
=
timelog_array
.
map
{
|
data
|
data
[
'timeSpent'
]
}
issue_title
=
timelog_array
.
map
{
|
data
|
data
[
'issue'
][
'title'
]
}
...
...
@@ -46,7 +45,6 @@ RSpec.describe 'Timelogs through GroupQuery' do
epic_title
=
timelog_array
.
map
{
|
data
|
data
[
'issue'
][
'epic'
][
'title'
]
}
expect
(
username
).
to
eq
([
user
.
username
])
expect
(
date
.
first
).
to
be_like_time
(
timelog1
.
spent_at
)
expect
(
spent_at
.
first
).
to
be_like_time
(
timelog1
.
spent_at
)
expect
(
time_spent
).
to
eq
([
timelog1
.
time_spent
])
expect
(
issue_title
).
to
eq
([
issue
.
title
])
...
...
@@ -121,7 +119,6 @@ RSpec.describe 'Timelogs through GroupQuery' do
def
query
(
timelog_params
=
params
)
timelog_nodes
=
<<~
NODE
nodes {
date
spentAt
timeSpent
user {
...
...
spec/graphql/types/commit_type_spec.rb
View file @
9c103924
...
...
@@ -10,7 +10,7 @@ RSpec.describe GitlabSchema.types['Commit'] do
it
'contains attributes related to commit'
do
expect
(
described_class
).
to
have_graphql_fields
(
:id
,
:sha
,
:title
,
:description
,
:description_html
,
:message
,
:title_html
,
:authored_date
,
:author_name
,
:author_gravatar
,
:author
,
:web_url
,
:web_path
,
:latest_pipeline
,
:author_name
,
:author_gravatar
,
:author
,
:web_url
,
:web_path
,
:pipelines
,
:signature_html
)
end
...
...
spec/graphql/types/grafana_integration_type_spec.rb
View file @
9c103924
...
...
@@ -7,7 +7,6 @@ RSpec.describe GitlabSchema.types['GrafanaIntegration'] do
%i[
id
grafana_url
token
enabled
created_at
updated_at
...
...
spec/graphql/types/issue_type_spec.rb
View file @
9c103924
...
...
@@ -17,7 +17,7 @@ RSpec.describe GitlabSchema.types['Issue'] do
fields
=
%i[id iid title description state reference author assignees updated_by participants labels milestone due_date
confidential discussion_locked upvotes downvotes user_notes_count user_discussions_count web_path web_url relative_position
emails_disabled subscribed time_estimate total_time_spent human_time_estimate human_total_time_spent closed_at created_at updated_at task_completion_status
design
s design
_collection alert_management_alert severity current_user_todos moved moved_to]
design_collection alert_management_alert severity current_user_todos moved moved_to]
fields
.
each
do
|
field_name
|
expect
(
described_class
).
to
have_graphql_field
(
field_name
)
...
...
spec/graphql/types/merge_request_type_spec.rb
View file @
9c103924
...
...
@@ -21,7 +21,7 @@ RSpec.describe GitlabSchema.types['MergeRequest'] do
diff_refs diff_stats diff_stats_summary
force_remove_source_branch merge_status in_progress_merge_commit_sha
merge_error allow_collaboration should_be_rebased rebase_commit_sha
rebase_in_progress
merge_commit_message
default_merge_commit_message
rebase_in_progress default_merge_commit_message
merge_ongoing mergeable_discussions_state web_url
source_branch_exists target_branch_exists
upvotes downvotes head_pipeline pipelines task_completion_status
...
...
spec/requests/api/graphql/project/grafana_integration_spec.rb
View file @
9c103924
...
...
@@ -45,7 +45,6 @@ RSpec.describe 'Getting Grafana Integration' do
it_behaves_like
'a working graphql query'
specify
{
expect
(
integration_data
[
'token'
]).
to
eql
grafana_integration
.
masked_token
}
specify
{
expect
(
integration_data
[
'grafanaUrl'
]).
to
eql
grafana_integration
.
grafana_url
}
specify
do
...
...
spec/requests/api/graphql/project/issue/designs/notes_spec.rb
View file @
9c103924
...
...
@@ -30,7 +30,7 @@ RSpec.describe 'Getting designs related to an issue' do
post_graphql
(
query
(
note_fields
),
current_user:
nil
)
designs_data
=
graphql_data
[
'project'
][
'issue'
][
'design
s
'
][
'designs'
]
designs_data
=
graphql_data
[
'project'
][
'issue'
][
'design
Collection
'
][
'designs'
]
design_data
=
designs_data
[
'nodes'
].
first
note_data
=
design_data
[
'notes'
][
'nodes'
].
first
...
...
@@ -56,7 +56,7 @@ RSpec.describe 'Getting designs related to an issue' do
'issue'
,
{
iid:
design
.
issue
.
iid
.
to_s
},
query_graphql_field
(
'design
s
'
,
{},
design_node
'design
Collection
'
,
{},
design_node
)
)
)
...
...
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