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
257a4ea0
Commit
257a4ea0
authored
Jan 27, 2020
by
Markus Koller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't require base_sha in DiffRefsType
parent
4ce16c24
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
11 deletions
+16
-11
app/graphql/types/diff_refs_type.rb
app/graphql/types/diff_refs_type.rb
+1
-1
changelogs/unreleased/security-graphql-diff-refs-empty-base-sha.yml
.../unreleased/security-graphql-diff-refs-empty-base-sha.yml
+5
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+1
-1
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+3
-7
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+1
-1
spec/graphql/types/diff_refs_type_spec.rb
spec/graphql/types/diff_refs_type_spec.rb
+5
-1
No files found.
app/graphql/types/diff_refs_type.rb
View file @
257a4ea0
...
@@ -8,7 +8,7 @@ module Types
...
@@ -8,7 +8,7 @@ module Types
field
:head_sha
,
GraphQL
::
STRING_TYPE
,
null:
false
,
field
:head_sha
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'SHA of the HEAD at the time the comment was made'
description:
'SHA of the HEAD at the time the comment was made'
field
:base_sha
,
GraphQL
::
STRING_TYPE
,
null:
fals
e
,
field
:base_sha
,
GraphQL
::
STRING_TYPE
,
null:
tru
e
,
description:
'Merge base of the branch the comment was made on'
description:
'Merge base of the branch the comment was made on'
field
:start_sha
,
GraphQL
::
STRING_TYPE
,
null:
false
,
field
:start_sha
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'SHA of the branch being compared against'
description:
'SHA of the branch being compared against'
...
...
changelogs/unreleased/security-graphql-diff-refs-empty-base-sha.yml
0 → 100644
View file @
257a4ea0
---
title
:
Don't require base_sha in DiffRefsType
merge_request
:
author
:
type
:
security
doc/api/graphql/reference/gitlab_schema.graphql
View file @
257a4ea0
...
@@ -1585,7 +1585,7 @@ type DiffRefs {
...
@@ -1585,7 +1585,7 @@ type DiffRefs {
"""
"""
Merge
base
of
the
branch
the
comment
was
made
on
Merge
base
of
the
branch
the
comment
was
made
on
"""
"""
baseSha
:
String
!
baseSha
:
String
"""
"""
SHA
of
the
HEAD
at
the
time
the
comment
was
made
SHA
of
the
HEAD
at
the
time
the
comment
was
made
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
257a4ea0
...
@@ -8386,13 +8386,9 @@
...
@@ -8386,13 +8386,9 @@
],
],
"type"
:
{
"type"
:
{
"kind"
:
"NON_NULL"
,
"kind"
:
"SCALAR"
,
"name"
:
null
,
"name"
:
"String"
,
"ofType"
:
{
"ofType"
:
null
"kind"
:
"SCALAR"
,
"name"
:
"String"
,
"ofType"
:
null
}
},
},
"isDeprecated"
:
false
,
"isDeprecated"
:
false
,
"deprecationReason"
:
null
"deprecationReason"
:
null
...
...
doc/api/graphql/reference/index.md
View file @
257a4ea0
...
@@ -263,7 +263,7 @@ Autogenerated return type of DestroySnippet
...
@@ -263,7 +263,7 @@ Autogenerated return type of DestroySnippet
| Name | Type | Description |
| Name | Type | Description |
| --- | ---- | ---------- |
| --- | ---- | ---------- |
|
`baseSha`
| String
!
| Merge base of the branch the comment was made on |
|
`baseSha`
| String | Merge base of the branch the comment was made on |
|
`headSha`
| String! | SHA of the HEAD at the time the comment was made |
|
`headSha`
| String! | SHA of the HEAD at the time the comment was made |
|
`startSha`
| String! | SHA of the branch being compared against |
|
`startSha`
| String! | SHA of the branch being compared against |
...
...
spec/graphql/types/diff_refs_type_spec.rb
View file @
257a4ea0
...
@@ -5,5 +5,9 @@ require 'spec_helper'
...
@@ -5,5 +5,9 @@ require 'spec_helper'
describe
GitlabSchema
.
types
[
'DiffRefs'
]
do
describe
GitlabSchema
.
types
[
'DiffRefs'
]
do
it
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'DiffRefs'
)
}
it
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'DiffRefs'
)
}
it
{
expect
(
described_class
).
to
have_graphql_fields
(
:base_sha
,
:head_sha
,
:start_sha
)
}
it
{
is_expected
.
to
have_graphql_fields
(
:head_sha
,
:base_sha
,
:start_sha
).
only
}
it
{
expect
(
described_class
.
fields
[
'headSha'
].
type
).
to
be_non_null
}
it
{
expect
(
described_class
.
fields
[
'baseSha'
].
type
).
not_to
be_non_null
}
it
{
expect
(
described_class
.
fields
[
'startSha'
].
type
).
to
be_non_null
}
end
end
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