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
11c53b94
Commit
11c53b94
authored
Jul 06, 2020
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use webPath in repository GraphQL responses
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/225849
parent
e8979927
Changes
38
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
185 additions
and
64 deletions
+185
-64
app/assets/javascripts/repository/components/breadcrumbs.vue
app/assets/javascripts/repository/components/breadcrumbs.vue
+6
-6
app/assets/javascripts/repository/components/last_commit.vue
app/assets/javascripts/repository/components/last_commit.vue
+7
-7
app/assets/javascripts/repository/components/preview/index.vue
...ssets/javascripts/repository/components/preview/index.vue
+4
-4
app/assets/javascripts/repository/components/table/index.vue
app/assets/javascripts/repository/components/table/index.vue
+3
-3
app/assets/javascripts/repository/components/table/row.vue
app/assets/javascripts/repository/components/table/row.vue
+2
-2
app/assets/javascripts/repository/components/tree_content.vue
...assets/javascripts/repository/components/tree_content.vue
+6
-6
app/assets/javascripts/repository/log_tree.js
app/assets/javascripts/repository/log_tree.js
+7
-7
app/assets/javascripts/repository/mixins/get_ref.js
app/assets/javascripts/repository/mixins/get_ref.js
+2
-2
app/assets/javascripts/repository/mixins/preload.js
app/assets/javascripts/repository/mixins/preload.js
+4
-4
app/assets/javascripts/repository/queries/commit.query.graphql
...ssets/javascripts/repository/queries/commit.query.graphql
+1
-1
app/assets/javascripts/repository/queries/commits.query.graphql
...sets/javascripts/repository/queries/commits.query.graphql
+1
-1
app/assets/javascripts/repository/queries/files.query.graphql
...assets/javascripts/repository/queries/files.query.graphql
+3
-3
app/assets/javascripts/repository/queries/path_last_commit.query.graphql
...scripts/repository/queries/path_last_commit.query.graphql
+3
-3
app/assets/javascripts/repository/queries/permissions.query.graphql
.../javascripts/repository/queries/permissions.query.graphql
+1
-1
app/assets/javascripts/repository/queries/project_path.query.graphql
...javascripts/repository/queries/project_path.query.graphql
+3
-0
app/assets/javascripts/repository/queries/project_short_path.query.graphql
...ripts/repository/queries/project_short_path.query.graphql
+1
-1
app/assets/javascripts/repository/queries/readme.query.graphql
...ssets/javascripts/repository/queries/readme.query.graphql
+1
-1
app/assets/javascripts/repository/queries/ref.query.graphql
app/assets/javascripts/repository/queries/ref.query.graphql
+1
-1
app/assets/javascripts/repository/queries/vue_file_list_lfs_badge.query.graphql
.../repository/queries/vue_file_list_lfs_badge.query.graphql
+1
-1
app/graphql/types/commit_type.rb
app/graphql/types/commit_type.rb
+2
-0
app/graphql/types/tree/blob_type.rb
app/graphql/types/tree/blob_type.rb
+2
-0
app/graphql/types/tree/tree_entry_type.rb
app/graphql/types/tree/tree_entry_type.rb
+2
-0
app/graphql/types/user_type.rb
app/graphql/types/user_type.rb
+2
-0
app/presenters/blob_presenter.rb
app/presenters/blob_presenter.rb
+4
-0
app/presenters/commit_presenter.rb
app/presenters/commit_presenter.rb
+4
-0
app/presenters/tree_entry_presenter.rb
app/presenters/tree_entry_presenter.rb
+4
-0
app/presenters/user_presenter.rb
app/presenters/user_presenter.rb
+4
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+20
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+64
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+4
-0
spec/frontend/repository/components/__snapshots__/last_commit_spec.js.snap
...ository/components/__snapshots__/last_commit_spec.js.snap
+6
-6
spec/frontend/repository/components/last_commit_spec.js
spec/frontend/repository/components/last_commit_spec.js
+2
-0
spec/frontend/repository/components/preview/__snapshots__/index_spec.js.snap
...itory/components/preview/__snapshots__/index_spec.js.snap
+1
-1
spec/frontend/repository/components/preview/index_spec.js
spec/frontend/repository/components/preview/index_spec.js
+3
-0
spec/graphql/types/commit_type_spec.rb
spec/graphql/types/commit_type_spec.rb
+1
-1
spec/graphql/types/tree/blob_type_spec.rb
spec/graphql/types/tree/blob_type_spec.rb
+1
-1
spec/graphql/types/tree/tree_entry_type_spec.rb
spec/graphql/types/tree/tree_entry_type_spec.rb
+1
-1
spec/graphql/types/user_type_spec.rb
spec/graphql/types/user_type_spec.rb
+1
-0
No files found.
app/assets/javascripts/repository/components/breadcrumbs.vue
View file @
11c53b94
...
@@ -4,9 +4,9 @@ import { joinPaths, escapeFileUrl } from '~/lib/utils/url_utility';
...
@@ -4,9 +4,9 @@ import { joinPaths, escapeFileUrl } from '~/lib/utils/url_utility';
import
{
__
}
from
'
../../locale
'
;
import
{
__
}
from
'
../../locale
'
;
import
Icon
from
'
../../vue_shared/components/icon.vue
'
;
import
Icon
from
'
../../vue_shared/components/icon.vue
'
;
import
getRefMixin
from
'
../mixins/get_ref
'
;
import
getRefMixin
from
'
../mixins/get_ref
'
;
import
getProjectShortPath
from
'
../queries/getProjectShortP
ath.query.graphql
'
;
import
projectShortPathQuery
from
'
../queries/project_short_p
ath.query.graphql
'
;
import
getProjectPath
from
'
../queries/getProjectP
ath.query.graphql
'
;
import
projetPathQuery
from
'
../queries/project_p
ath.query.graphql
'
;
import
getPermissions
from
'
../queries/getP
ermissions.query.graphql
'
;
import
permissionsQuery
from
'
../queries/p
ermissions.query.graphql
'
;
const
ROW_TYPES
=
{
const
ROW_TYPES
=
{
header
:
'
header
'
,
header
:
'
header
'
,
...
@@ -23,13 +23,13 @@ export default {
...
@@ -23,13 +23,13 @@ export default {
},
},
apollo
:
{
apollo
:
{
projectShortPath
:
{
projectShortPath
:
{
query
:
getProjectShortPath
,
query
:
projectShortPathQuery
,
},
},
projectPath
:
{
projectPath
:
{
query
:
getProjectPath
,
query
:
projetPathQuery
,
},
},
userPermissions
:
{
userPermissions
:
{
query
:
getPermissions
,
query
:
permissionsQuery
,
variables
()
{
variables
()
{
return
{
return
{
projectPath
:
this
.
projectPath
,
projectPath
:
this
.
projectPath
,
...
...
app/assets/javascripts/repository/components/last_commit.vue
View file @
11c53b94
...
@@ -8,8 +8,8 @@ import TimeagoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
...
@@ -8,8 +8,8 @@ import TimeagoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
import
CiIcon
from
'
../../vue_shared/components/ci_icon.vue
'
;
import
CiIcon
from
'
../../vue_shared/components/ci_icon.vue
'
;
import
ClipboardButton
from
'
../../vue_shared/components/clipboard_button.vue
'
;
import
ClipboardButton
from
'
../../vue_shared/components/clipboard_button.vue
'
;
import
getRefMixin
from
'
../mixins/get_ref
'
;
import
getRefMixin
from
'
../mixins/get_ref
'
;
import
getProjectPath
from
'
../queries/getProjectP
ath.query.graphql
'
;
import
projectPathQuery
from
'
../queries/project_p
ath.query.graphql
'
;
import
pathLastCommit
from
'
../queries/pathLastC
ommit.query.graphql
'
;
import
pathLastCommit
Query
from
'
../queries/path_last_c
ommit.query.graphql
'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -28,10 +28,10 @@ export default {
...
@@ -28,10 +28,10 @@ export default {
mixins
:
[
getRefMixin
],
mixins
:
[
getRefMixin
],
apollo
:
{
apollo
:
{
projectPath
:
{
projectPath
:
{
query
:
getProjectPath
,
query
:
projectPathQuery
,
},
},
commit
:
{
commit
:
{
query
:
pathLastCommit
,
query
:
pathLastCommit
Query
,
variables
()
{
variables
()
{
return
{
return
{
projectPath
:
this
.
projectPath
,
projectPath
:
this
.
projectPath
,
...
@@ -102,7 +102,7 @@ export default {
...
@@ -102,7 +102,7 @@ export default {
<template
v-else-if=
"commit"
>
<template
v-else-if=
"commit"
>
<user-avatar-link
<user-avatar-link
v-if=
"commit.author"
v-if=
"commit.author"
:link-href=
"commit.author.web
Url
"
:link-href=
"commit.author.web
Path
"
:img-src=
"commit.author.avatarUrl"
:img-src=
"commit.author.avatarUrl"
:img-size=
"40"
:img-size=
"40"
class=
"avatar-cell"
class=
"avatar-cell"
...
@@ -118,7 +118,7 @@ export default {
...
@@ -118,7 +118,7 @@ export default {
<div
class=
"commit-detail flex-list"
>
<div
class=
"commit-detail flex-list"
>
<div
class=
"commit-content qa-commit-content"
>
<div
class=
"commit-content qa-commit-content"
>
<gl-link
<gl-link
:href=
"commit.web
Url
"
:href=
"commit.web
Path
"
:class=
"
{ 'font-italic': !commit.message }"
:class=
"
{ 'font-italic': !commit.message }"
class="commit-row-message item-title"
class="commit-row-message item-title"
v-html="commit.titleHtml"
v-html="commit.titleHtml"
...
@@ -135,7 +135,7 @@ export default {
...
@@ -135,7 +135,7 @@ export default {
<div
class=
"committer"
>
<div
class=
"committer"
>
<gl-link
<gl-link
v-if=
"commit.author"
v-if=
"commit.author"
:href=
"commit.author.web
Url
"
:href=
"commit.author.web
Path
"
class=
"commit-author-link js-user-link"
class=
"commit-author-link js-user-link"
>
>
{{
commit
.
author
.
name
}}
{{
commit
.
author
.
name
}}
...
...
app/assets/javascripts/repository/components/preview/index.vue
View file @
11c53b94
...
@@ -3,15 +3,15 @@ import $ from 'jquery';
...
@@ -3,15 +3,15 @@ import $ from 'jquery';
import
'
~/behaviors/markdown/render_gfm
'
;
import
'
~/behaviors/markdown/render_gfm
'
;
import
{
GlLink
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlLink
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
handleLocationHash
}
from
'
~/lib/utils/common_utils
'
;
import
{
handleLocationHash
}
from
'
~/lib/utils/common_utils
'
;
import
getReadmeQuery
from
'
../../queries/getR
eadme.query.graphql
'
;
import
readmeQery
from
'
../../queries/r
eadme.query.graphql
'
;
export
default
{
export
default
{
apollo
:
{
apollo
:
{
readme
:
{
readme
:
{
query
:
getReadmeQu
ery
,
query
:
readmeQ
ery
,
variables
()
{
variables
()
{
return
{
return
{
url
:
this
.
blob
.
web
Url
,
url
:
this
.
blob
.
web
Path
,
};
};
},
},
loadingKey
:
'
loading
'
,
loadingKey
:
'
loading
'
,
...
@@ -51,7 +51,7 @@ export default {
...
@@ -51,7 +51,7 @@ export default {
<div
class=
"js-file-title file-title-flex-parent"
>
<div
class=
"js-file-title file-title-flex-parent"
>
<div
class=
"file-header-content"
>
<div
class=
"file-header-content"
>
<i
aria-hidden=
"true"
class=
"fa fa-file-text-o fa-fw"
></i>
<i
aria-hidden=
"true"
class=
"fa fa-file-text-o fa-fw"
></i>
<gl-link
:href=
"blob.web
Url
"
>
<gl-link
:href=
"blob.web
Path
"
>
<strong>
{{
blob
.
name
}}
</strong>
<strong>
{{
blob
.
name
}}
</strong>
</gl-link>
</gl-link>
</div>
</div>
...
...
app/assets/javascripts/repository/components/table/index.vue
View file @
11c53b94
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
{
GlSkeletonLoading
}
from
'
@gitlab/ui
'
;
import
{
GlSkeletonLoading
}
from
'
@gitlab/ui
'
;
import
{
sprintf
,
__
}
from
'
../../../locale
'
;
import
{
sprintf
,
__
}
from
'
../../../locale
'
;
import
getRefMixin
from
'
../../mixins/get_ref
'
;
import
getRefMixin
from
'
../../mixins/get_ref
'
;
import
getProjectPath
from
'
../../queries/getProjectP
ath.query.graphql
'
;
import
projectPathQuery
from
'
../../queries/project_p
ath.query.graphql
'
;
import
TableHeader
from
'
./header.vue
'
;
import
TableHeader
from
'
./header.vue
'
;
import
TableRow
from
'
./row.vue
'
;
import
TableRow
from
'
./row.vue
'
;
import
ParentRow
from
'
./parent_row.vue
'
;
import
ParentRow
from
'
./parent_row.vue
'
;
...
@@ -17,7 +17,7 @@ export default {
...
@@ -17,7 +17,7 @@ export default {
mixins
:
[
getRefMixin
],
mixins
:
[
getRefMixin
],
apollo
:
{
apollo
:
{
projectPath
:
{
projectPath
:
{
query
:
getProjectPath
,
query
:
projectPathQuery
,
},
},
},
},
props
:
{
props
:
{
...
@@ -96,7 +96,7 @@ export default {
...
@@ -96,7 +96,7 @@ export default {
:name="entry.name"
:name="entry.name"
:path="entry.flatPath"
:path="entry.flatPath"
:type="entry.type"
:type="entry.type"
:url="entry.webUrl"
:url="entry.webUrl
|| entry.webPath
"
:submodule-tree-url="entry.treeUrl"
:submodule-tree-url="entry.treeUrl"
:lfs-oid="entry.lfsOid"
:lfs-oid="entry.lfsOid"
:loading-path="loadingPath"
:loading-path="loadingPath"
...
...
app/assets/javascripts/repository/components/table/row.vue
View file @
11c53b94
...
@@ -12,7 +12,7 @@ import { escapeFileUrl } from '~/lib/utils/url_utility';
...
@@ -12,7 +12,7 @@ import { escapeFileUrl } from '~/lib/utils/url_utility';
import
TimeagoTooltip
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
import
TimeagoTooltip
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
import
FileIcon
from
'
~/vue_shared/components/file_icon.vue
'
;
import
FileIcon
from
'
~/vue_shared/components/file_icon.vue
'
;
import
getRefMixin
from
'
../../mixins/get_ref
'
;
import
getRefMixin
from
'
../../mixins/get_ref
'
;
import
getCommit
from
'
../../queries/getC
ommit.query.graphql
'
;
import
commitQuery
from
'
../../queries/c
ommit.query.graphql
'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -29,7 +29,7 @@ export default {
...
@@ -29,7 +29,7 @@ export default {
},
},
apollo
:
{
apollo
:
{
commit
:
{
commit
:
{
query
:
getCommit
,
query
:
commitQuery
,
variables
()
{
variables
()
{
return
{
return
{
fileName
:
this
.
name
,
fileName
:
this
.
name
,
...
...
app/assets/javascripts/repository/components/tree_content.vue
View file @
11c53b94
...
@@ -3,9 +3,9 @@ import createFlash from '~/flash';
...
@@ -3,9 +3,9 @@ import createFlash from '~/flash';
import
{
__
}
from
'
../../locale
'
;
import
{
__
}
from
'
../../locale
'
;
import
FileTable
from
'
./table/index.vue
'
;
import
FileTable
from
'
./table/index.vue
'
;
import
getRefMixin
from
'
../mixins/get_ref
'
;
import
getRefMixin
from
'
../mixins/get_ref
'
;
import
getFiles
from
'
../queries/getF
iles.query.graphql
'
;
import
filesQuery
from
'
../queries/f
iles.query.graphql
'
;
import
getProjectPath
from
'
../queries/getProjectP
ath.query.graphql
'
;
import
projectPathQuery
from
'
../queries/project_p
ath.query.graphql
'
;
import
getVueFileListLfsBadge
from
'
../queries/getVueFileListLfsB
adge.query.graphql
'
;
import
vueFileListLfsBadgeQuery
from
'
../queries/vue_file_list_lfs_b
adge.query.graphql
'
;
import
FilePreview
from
'
./preview/index.vue
'
;
import
FilePreview
from
'
./preview/index.vue
'
;
import
{
readmeFile
}
from
'
../utils/readme
'
;
import
{
readmeFile
}
from
'
../utils/readme
'
;
...
@@ -19,10 +19,10 @@ export default {
...
@@ -19,10 +19,10 @@ export default {
mixins
:
[
getRefMixin
],
mixins
:
[
getRefMixin
],
apollo
:
{
apollo
:
{
projectPath
:
{
projectPath
:
{
query
:
getProjectPath
,
query
:
projectPathQuery
,
},
},
vueFileListLfsBadge
:
{
vueFileListLfsBadge
:
{
query
:
getVueFileListLfsBadge
,
query
:
vueFileListLfsBadgeQuery
,
},
},
},
},
props
:
{
props
:
{
...
@@ -75,7 +75,7 @@ export default {
...
@@ -75,7 +75,7 @@ export default {
return
this
.
$apollo
return
this
.
$apollo
.
query
({
.
query
({
query
:
getFiles
,
query
:
filesQuery
,
variables
:
{
variables
:
{
projectPath
:
this
.
projectPath
,
projectPath
:
this
.
projectPath
,
ref
:
this
.
ref
,
ref
:
this
.
ref
,
...
...
app/assets/javascripts/repository/log_tree.js
View file @
11c53b94
import
{
normalizeData
}
from
'
ee_else_ce/repository/utils/commit
'
;
import
{
normalizeData
}
from
'
ee_else_ce/repository/utils/commit
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
getCommits
from
'
./queries/getC
ommits.query.graphql
'
;
import
commitsQuery
from
'
./queries/c
ommits.query.graphql
'
;
import
getProjectPath
from
'
./queries/getProjectP
ath.query.graphql
'
;
import
projectPathQuery
from
'
./queries/project_p
ath.query.graphql
'
;
import
getRef
from
'
./queries/getR
ef.query.graphql
'
;
import
refQuery
from
'
./queries/r
ef.query.graphql
'
;
let
fetchpromise
;
let
fetchpromise
;
let
resolvers
=
[];
let
resolvers
=
[];
...
@@ -22,8 +22,8 @@ export function fetchLogsTree(client, path, offset, resolver = null) {
...
@@ -22,8 +22,8 @@ export function fetchLogsTree(client, path, offset, resolver = null) {
if
(
fetchpromise
)
return
fetchpromise
;
if
(
fetchpromise
)
return
fetchpromise
;
const
{
projectPath
}
=
client
.
readQuery
({
query
:
getProjectPath
});
const
{
projectPath
}
=
client
.
readQuery
({
query
:
projectPathQuery
});
const
{
escapedRef
}
=
client
.
readQuery
({
query
:
getRef
});
const
{
escapedRef
}
=
client
.
readQuery
({
query
:
refQuery
});
fetchpromise
=
axios
fetchpromise
=
axios
.
get
(
.
get
(
...
@@ -36,10 +36,10 @@ export function fetchLogsTree(client, path, offset, resolver = null) {
...
@@ -36,10 +36,10 @@ export function fetchLogsTree(client, path, offset, resolver = null) {
)
)
.
then
(({
data
,
headers
})
=>
{
.
then
(({
data
,
headers
})
=>
{
const
headerLogsOffset
=
headers
[
'
more-logs-offset
'
];
const
headerLogsOffset
=
headers
[
'
more-logs-offset
'
];
const
{
commits
}
=
client
.
readQuery
({
query
:
getCommits
});
const
{
commits
}
=
client
.
readQuery
({
query
:
commitsQuery
});
const
newCommitData
=
[...
commits
,
...
normalizeData
(
data
,
path
)];
const
newCommitData
=
[...
commits
,
...
normalizeData
(
data
,
path
)];
client
.
writeQuery
({
client
.
writeQuery
({
query
:
getCommits
,
query
:
commitsQuery
,
data
:
{
commits
:
newCommitData
},
data
:
{
commits
:
newCommitData
},
});
});
...
...
app/assets/javascripts/repository/mixins/get_ref.js
View file @
11c53b94
import
getRef
from
'
../queries/getR
ef.query.graphql
'
;
import
refQuery
from
'
../queries/r
ef.query.graphql
'
;
export
default
{
export
default
{
apollo
:
{
apollo
:
{
ref
:
{
ref
:
{
query
:
getRef
,
query
:
refQuery
,
manual
:
true
,
manual
:
true
,
result
({
data
,
loading
})
{
result
({
data
,
loading
})
{
if
(
!
loading
)
{
if
(
!
loading
)
{
...
...
app/assets/javascripts/repository/mixins/preload.js
View file @
11c53b94
import
getFiles
from
'
../queries/getF
iles.query.graphql
'
;
import
filesQuery
from
'
../queries/f
iles.query.graphql
'
;
import
getRefMixin
from
'
./get_ref
'
;
import
getRefMixin
from
'
./get_ref
'
;
import
getProjectPath
from
'
../queries/getProjectP
ath.query.graphql
'
;
import
projectPathQuery
from
'
../queries/project_p
ath.query.graphql
'
;
export
default
{
export
default
{
mixins
:
[
getRefMixin
],
mixins
:
[
getRefMixin
],
apollo
:
{
apollo
:
{
projectPath
:
{
projectPath
:
{
query
:
getProjectPath
,
query
:
projectPathQuery
,
},
},
},
},
data
()
{
data
()
{
...
@@ -21,7 +21,7 @@ export default {
...
@@ -21,7 +21,7 @@ export default {
return
this
.
$apollo
return
this
.
$apollo
.
query
({
.
query
({
query
:
getFiles
,
query
:
filesQuery
,
variables
:
{
variables
:
{
projectPath
:
this
.
projectPath
,
projectPath
:
this
.
projectPath
,
ref
:
this
.
ref
,
ref
:
this
.
ref
,
...
...
app/assets/javascripts/repository/queries/
getC
ommit.query.graphql
→
app/assets/javascripts/repository/queries/
c
ommit.query.graphql
View file @
11c53b94
#import "ee_else_ce/repository/queries/commit.fragment.graphql"
#import "ee_else_ce/repository/queries/commit.fragment.graphql"
query
get
Commit
(
$fileName
:
String
!,
$type
:
String
!,
$path
:
String
!)
{
query
Commit
(
$fileName
:
String
!,
$type
:
String
!,
$path
:
String
!)
{
commit
(
path
:
$path
,
fileName
:
$fileName
,
type
:
$type
)
@client
{
commit
(
path
:
$path
,
fileName
:
$fileName
,
type
:
$type
)
@client
{
...
TreeEntryCommit
...
TreeEntryCommit
}
}
...
...
app/assets/javascripts/repository/queries/
getC
ommits.query.graphql
→
app/assets/javascripts/repository/queries/
c
ommits.query.graphql
View file @
11c53b94
#import "ee_else_ce/repository/queries/commit.fragment.graphql"
#import "ee_else_ce/repository/queries/commit.fragment.graphql"
query
get
Commits
{
query
Commits
{
commits
@client
{
commits
@client
{
...
TreeEntryCommit
...
TreeEntryCommit
}
}
...
...
app/assets/javascripts/repository/queries/
getF
iles.query.graphql
→
app/assets/javascripts/repository/queries/
f
iles.query.graphql
View file @
11c53b94
...
@@ -8,7 +8,7 @@ fragment TreeEntry on Entry {
...
@@ -8,7 +8,7 @@ fragment TreeEntry on Entry {
type
type
}
}
query
get
Files
(
query
Files
(
$projectPath
:
ID
!
$projectPath
:
ID
!
$path
:
String
$path
:
String
$ref
:
String
!
$ref
:
String
!
...
@@ -23,7 +23,7 @@ query getFiles(
...
@@ -23,7 +23,7 @@ query getFiles(
edges
{
edges
{
node
{
node
{
...
TreeEntry
...
TreeEntry
web
Url
web
Path
}
}
}
}
pageInfo
{
pageInfo
{
...
@@ -46,7 +46,7 @@ query getFiles(
...
@@ -46,7 +46,7 @@ query getFiles(
edges
{
edges
{
node
{
node
{
...
TreeEntry
...
TreeEntry
web
Url
web
Path
lfsOid
@include
(
if
:
$vueLfsEnabled
)
lfsOid
@include
(
if
:
$vueLfsEnabled
)
}
}
}
}
...
...
app/assets/javascripts/repository/queries/path
LastC
ommit.query.graphql
→
app/assets/javascripts/repository/queries/path
_last_c
ommit.query.graphql
View file @
11c53b94
query
p
athLastCommit
(
$projectPath
:
ID
!,
$path
:
String
,
$ref
:
String
!)
{
query
P
athLastCommit
(
$projectPath
:
ID
!,
$path
:
String
,
$ref
:
String
!)
{
project
(
fullPath
:
$projectPath
)
{
project
(
fullPath
:
$projectPath
)
{
repository
{
repository
{
tree
(
path
:
$path
,
ref
:
$ref
)
{
tree
(
path
:
$path
,
ref
:
$ref
)
{
...
@@ -8,14 +8,14 @@ query pathLastCommit($projectPath: ID!, $path: String, $ref: String!) {
...
@@ -8,14 +8,14 @@ query pathLastCommit($projectPath: ID!, $path: String, $ref: String!) {
titleHtml
titleHtml
description
description
message
message
web
Url
web
Path
authoredDate
authoredDate
authorName
authorName
authorGravatar
authorGravatar
author
{
author
{
name
name
avatarUrl
avatarUrl
web
Url
web
Path
}
}
signatureHtml
signatureHtml
pipelines
(
ref
:
$ref
,
first
:
1
)
{
pipelines
(
ref
:
$ref
,
first
:
1
)
{
...
...
app/assets/javascripts/repository/queries/
getP
ermissions.query.graphql
→
app/assets/javascripts/repository/queries/
p
ermissions.query.graphql
View file @
11c53b94
query
get
Permissions
(
$projectPath
:
ID
!)
{
query
Permissions
(
$projectPath
:
ID
!)
{
project
(
fullPath
:
$projectPath
)
{
project
(
fullPath
:
$projectPath
)
{
userPermissions
{
userPermissions
{
pushCode
pushCode
...
...
app/assets/javascripts/repository/queries/
getProjectP
ath.query.graphql
→
app/assets/javascripts/repository/queries/
project_p
ath.query.graphql
View file @
11c53b94
query
get
ProjectPath
{
query
ProjectPath
{
projectPath
projectPath
}
}
app/assets/javascripts/repository/queries/
getProjectShortP
ath.query.graphql
→
app/assets/javascripts/repository/queries/
project_short_p
ath.query.graphql
View file @
11c53b94
query
get
ProjectShortPath
{
query
ProjectShortPath
{
projectShortPath
@client
projectShortPath
@client
}
}
app/assets/javascripts/repository/queries/
getR
eadme.query.graphql
→
app/assets/javascripts/repository/queries/
r
eadme.query.graphql
View file @
11c53b94
query
get
Readme
(
$url
:
String
!)
{
query
Readme
(
$url
:
String
!)
{
readme
(
url
:
$url
)
@client
{
readme
(
url
:
$url
)
@client
{
html
html
}
}
...
...
app/assets/javascripts/repository/queries/
getR
ef.query.graphql
→
app/assets/javascripts/repository/queries/
r
ef.query.graphql
View file @
11c53b94
query
get
Ref
{
query
Ref
{
ref
@client
ref
@client
escapedRef
@client
escapedRef
@client
}
}
app/assets/javascripts/repository/queries/
getVueFileListLfsB
adge.query.graphql
→
app/assets/javascripts/repository/queries/
vue_file_list_lfs_b
adge.query.graphql
View file @
11c53b94
query
get
VueFileListLfsBadge
{
query
VueFileListLfsBadge
{
vueFileListLfsBadge
@client
vueFileListLfsBadge
@client
}
}
app/graphql/types/commit_type.rb
View file @
11c53b94
...
@@ -23,6 +23,8 @@ module Types
...
@@ -23,6 +23,8 @@ module Types
description:
'Timestamp of when the commit was authored'
description:
'Timestamp of when the commit was authored'
field
:web_url
,
type:
GraphQL
::
STRING_TYPE
,
null:
false
,
field
:web_url
,
type:
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'Web URL of the commit'
description:
'Web URL of the commit'
field
:web_path
,
type:
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'Web path of the commit'
field
:signature_html
,
type:
GraphQL
::
STRING_TYPE
,
null:
true
,
calls_gitaly:
true
,
field
:signature_html
,
type:
GraphQL
::
STRING_TYPE
,
null:
true
,
calls_gitaly:
true
,
description:
'Rendered HTML of the commit signature'
description:
'Rendered HTML of the commit signature'
field
:author_name
,
type:
GraphQL
::
STRING_TYPE
,
null:
true
,
field
:author_name
,
type:
GraphQL
::
STRING_TYPE
,
null:
true
,
...
...
app/graphql/types/tree/blob_type.rb
View file @
11c53b94
...
@@ -12,6 +12,8 @@ module Types
...
@@ -12,6 +12,8 @@ module Types
field
:web_url
,
GraphQL
::
STRING_TYPE
,
null:
true
,
field
:web_url
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
'Web URL of the blob'
description:
'Web URL of the blob'
field
:web_path
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
'Web path of the blob'
field
:lfs_oid
,
GraphQL
::
STRING_TYPE
,
null:
true
,
field
:lfs_oid
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
'LFS ID of the blob'
,
description:
'LFS ID of the blob'
,
resolve:
->
(
blob
,
args
,
ctx
)
do
resolve:
->
(
blob
,
args
,
ctx
)
do
...
...
app/graphql/types/tree/tree_entry_type.rb
View file @
11c53b94
...
@@ -13,6 +13,8 @@ module Types
...
@@ -13,6 +13,8 @@ module Types
field
:web_url
,
GraphQL
::
STRING_TYPE
,
null:
true
,
field
:web_url
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
'Web URL for the tree entry (directory)'
description:
'Web URL for the tree entry (directory)'
field
:web_path
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
'Web path for the tree entry (directory)'
end
end
# rubocop: enable Graphql/AuthorizeTypes
# rubocop: enable Graphql/AuthorizeTypes
end
end
...
...
app/graphql/types/user_type.rb
View file @
11c53b94
...
@@ -22,6 +22,8 @@ module Types
...
@@ -22,6 +22,8 @@ module Types
description:
"URL of the user's avatar"
description:
"URL of the user's avatar"
field
:web_url
,
GraphQL
::
STRING_TYPE
,
null:
false
,
field
:web_url
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'Web URL of the user'
description:
'Web URL of the user'
field
:web_path
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'Web path of the user'
field
:todos
,
Types
::
TodoType
.
connection_type
,
null:
false
,
field
:todos
,
Types
::
TodoType
.
connection_type
,
null:
false
,
resolver:
Resolvers
::
TodoResolver
,
resolver:
Resolvers
::
TodoResolver
,
description:
'Todos of the user'
description:
'Todos of the user'
...
...
app/presenters/blob_presenter.rb
View file @
11c53b94
...
@@ -18,6 +18,10 @@ class BlobPresenter < Gitlab::View::Presenter::Delegated
...
@@ -18,6 +18,10 @@ class BlobPresenter < Gitlab::View::Presenter::Delegated
Gitlab
::
Routing
.
url_helpers
.
project_blob_url
(
blob
.
repository
.
project
,
File
.
join
(
blob
.
commit_id
,
blob
.
path
))
Gitlab
::
Routing
.
url_helpers
.
project_blob_url
(
blob
.
repository
.
project
,
File
.
join
(
blob
.
commit_id
,
blob
.
path
))
end
end
def
web_path
Gitlab
::
Routing
.
url_helpers
.
project_blob_path
(
blob
.
repository
.
project
,
File
.
join
(
blob
.
commit_id
,
blob
.
path
))
end
private
private
def
load_all_blob_data
def
load_all_blob_data
...
...
app/presenters/commit_presenter.rb
View file @
11c53b94
...
@@ -21,6 +21,10 @@ class CommitPresenter < Gitlab::View::Presenter::Delegated
...
@@ -21,6 +21,10 @@ class CommitPresenter < Gitlab::View::Presenter::Delegated
url_builder
.
build
(
commit
)
url_builder
.
build
(
commit
)
end
end
def
web_path
url_builder
.
build
(
commit
,
only_path:
true
)
end
def
signature_html
def
signature_html
return
unless
commit
.
has_signature?
return
unless
commit
.
has_signature?
...
...
app/presenters/tree_entry_presenter.rb
View file @
11c53b94
...
@@ -6,4 +6,8 @@ class TreeEntryPresenter < Gitlab::View::Presenter::Delegated
...
@@ -6,4 +6,8 @@ class TreeEntryPresenter < Gitlab::View::Presenter::Delegated
def
web_url
def
web_url
Gitlab
::
Routing
.
url_helpers
.
project_tree_url
(
tree
.
repository
.
project
,
File
.
join
(
tree
.
commit_id
,
tree
.
path
))
Gitlab
::
Routing
.
url_helpers
.
project_tree_url
(
tree
.
repository
.
project
,
File
.
join
(
tree
.
commit_id
,
tree
.
path
))
end
end
def
web_path
Gitlab
::
Routing
.
url_helpers
.
project_tree_path
(
tree
.
repository
.
project
,
File
.
join
(
tree
.
commit_id
,
tree
.
path
))
end
end
end
app/presenters/user_presenter.rb
View file @
11c53b94
...
@@ -6,4 +6,8 @@ class UserPresenter < Gitlab::View::Presenter::Delegated
...
@@ -6,4 +6,8 @@ class UserPresenter < Gitlab::View::Presenter::Delegated
def
web_url
def
web_url
Gitlab
::
Routing
.
url_helpers
.
user_url
(
user
)
Gitlab
::
Routing
.
url_helpers
.
user_url
(
user
)
end
end
def
web_path
Gitlab
::
Routing
.
url_helpers
.
user_path
(
user
)
end
end
end
doc/api/graphql/reference/gitlab_schema.graphql
View file @
11c53b94
...
@@ -813,6 +813,11 @@ type Blob implements Entry {
...
@@ -813,6 +813,11 @@ type Blob implements Entry {
"""
"""
type
:
EntryType
!
type
:
EntryType
!
"""
Web
path
of
the
blob
"""
webPath
:
String
"""
"""
Web
URL
of
the
blob
Web
URL
of
the
blob
"""
"""
...
@@ -1216,6 +1221,11 @@ type Commit {
...
@@ -1216,6 +1221,11 @@ type Commit {
"""
"""
titleHtml
:
String
titleHtml
:
String
"""
Web
path
of
the
commit
"""
webPath
:
String
!
"""
"""
Web
URL
of
the
commit
Web
URL
of
the
commit
"""
"""
...
@@ -13072,6 +13082,11 @@ type TreeEntry implements Entry {
...
@@ -13072,6 +13082,11 @@ type TreeEntry implements Entry {
"""
"""
type
:
EntryType
!
type
:
EntryType
!
"""
Web
path
for
the
tree
entry
(
directory
)
"""
webPath
:
String
"""
"""
Web
URL
for
the
tree
entry
(
directory
)
Web
URL
for
the
tree
entry
(
directory
)
"""
"""
...
@@ -13973,6 +13988,11 @@ type User {
...
@@ -13973,6 +13988,11 @@ type User {
"""
"""
username
:
String
!
username
:
String
!
"""
Web
path
of
the
user
"""
webPath
:
String
!
"""
"""
Web
URL
of
the
user
Web
URL
of
the
user
"""
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
11c53b94
...
@@ -2128,6 +2128,20 @@
...
@@ -2128,6 +2128,20 @@
"isDeprecated": false,
"isDeprecated": false,
"deprecationReason": null
"deprecationReason": null
},
},
{
"name": "webPath",
"description": "Web path of the blob",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
{
"name": "webUrl",
"name": "webUrl",
"description": "Web URL of the blob",
"description": "Web URL of the blob",
...
@@ -3290,6 +3304,24 @@
...
@@ -3290,6 +3304,24 @@
"isDeprecated": false,
"isDeprecated": false,
"deprecationReason": null
"deprecationReason": null
},
},
{
"name": "webPath",
"description": "Web path of the commit",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
{
"name": "webUrl",
"name": "webUrl",
"description": "Web URL of the commit",
"description": "Web URL of the commit",
...
@@ -38670,6 +38702,20 @@
...
@@ -38670,6 +38702,20 @@
"isDeprecated": false,
"isDeprecated": false,
"deprecationReason": null
"deprecationReason": null
},
},
{
"name": "webPath",
"description": "Web path for the tree entry (directory)",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
{
"name": "webUrl",
"name": "webUrl",
"description": "Web URL for the tree entry (directory)",
"description": "Web URL for the tree entry (directory)",
...
@@ -41087,6 +41133,24 @@
...
@@ -41087,6 +41133,24 @@
"isDeprecated": false,
"isDeprecated": false,
"deprecationReason": null
"deprecationReason": null
},
},
{
"name": "webPath",
"description": "Web path of the user",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
{
"name": "webUrl",
"name": "webUrl",
"description": "Web URL of the user",
"description": "Web URL of the user",
doc/api/graphql/reference/index.md
View file @
11c53b94
...
@@ -164,6 +164,7 @@ Autogenerated return type of AwardEmojiToggle
...
@@ -164,6 +164,7 @@ Autogenerated return type of AwardEmojiToggle
|
`path`
| String! | Path of the entry |
|
`path`
| String! | Path of the entry |
|
`sha`
| String! | Last commit sha for the entry |
|
`sha`
| String! | Last commit sha for the entry |
|
`type`
| EntryType! | Type of tree entry |
|
`type`
| EntryType! | Type of tree entry |
|
`webPath`
| String | Web path of the blob |
|
`webUrl`
| String | Web URL of the blob |
|
`webUrl`
| String | Web URL of the blob |
## Board
## Board
...
@@ -227,6 +228,7 @@ Autogenerated return type of BoardListUpdateLimitMetrics
...
@@ -227,6 +228,7 @@ Autogenerated return type of BoardListUpdateLimitMetrics
|
`signatureHtml`
| String | Rendered HTML of the commit signature |
|
`signatureHtml`
| String | Rendered HTML of the commit signature |
|
`title`
| String | Title of the commit message |
|
`title`
| String | Title of the commit message |
|
`titleHtml`
| String | The GitLab Flavored Markdown rendering of
`title`
|
|
`titleHtml`
| String | The GitLab Flavored Markdown rendering of
`title`
|
|
`webPath`
| String! | Web path of the commit |
|
`webUrl`
| String! | Web URL of the commit |
|
`webUrl`
| String! | Web URL of the commit |
## CommitCreatePayload
## CommitCreatePayload
...
@@ -1982,6 +1984,7 @@ Represents a directory
...
@@ -1982,6 +1984,7 @@ Represents a directory
|
`path`
| String! | Path of the entry |
|
`path`
| String! | Path of the entry |
|
`sha`
| String! | Last commit sha for the entry |
|
`sha`
| String! | Last commit sha for the entry |
|
`type`
| EntryType! | Type of tree entry |
|
`type`
| EntryType! | Type of tree entry |
|
`webPath`
| String | Web path for the tree entry (directory) |
|
`webUrl`
| String | Web URL for the tree entry (directory) |
|
`webUrl`
| String | Web URL for the tree entry (directory) |
## UpdateAlertStatusPayload
## UpdateAlertStatusPayload
...
@@ -2085,6 +2088,7 @@ Autogenerated return type of UpdateSnippet
...
@@ -2085,6 +2088,7 @@ Autogenerated return type of UpdateSnippet
|
`state`
| UserState! | State of the user |
|
`state`
| UserState! | State of the user |
|
`userPermissions`
| UserPermissions! | Permissions for the current user on the resource |
|
`userPermissions`
| UserPermissions! | Permissions for the current user on the resource |
|
`username`
| String! | Username of the user. Unique within this instance of GitLab |
|
`username`
| String! | Username of the user. Unique within this instance of GitLab |
|
`webPath`
| String! | Web path of the user |
|
`webUrl`
| String! | Web URL of the user |
|
`webUrl`
| String! | Web URL of the user |
## UserPermissions
## UserPermissions
...
...
spec/frontend/repository/components/__snapshots__/last_commit_spec.js.snap
View file @
11c53b94
...
@@ -10,7 +10,7 @@ exports[`Repository last commit component renders commit widget 1`] = `
...
@@ -10,7 +10,7 @@ exports[`Repository last commit component renders commit widget 1`] = `
imgcssclasses=""
imgcssclasses=""
imgsize="40"
imgsize="40"
imgsrc="https://test.com"
imgsrc="https://test.com"
linkhref="
https://test.com
/test"
linkhref="/test"
tooltipplacement="top"
tooltipplacement="top"
tooltiptext=""
tooltiptext=""
username=""
username=""
...
@@ -24,7 +24,7 @@ exports[`Repository last commit component renders commit widget 1`] = `
...
@@ -24,7 +24,7 @@ exports[`Repository last commit component renders commit widget 1`] = `
>
>
<gl-link-stub
<gl-link-stub
class="commit-row-message item-title"
class="commit-row-message item-title"
href="
https://test.com
/commit/123"
href="/commit/123"
>
>
Commit title
Commit title
</gl-link-stub>
</gl-link-stub>
...
@@ -36,7 +36,7 @@ exports[`Repository last commit component renders commit widget 1`] = `
...
@@ -36,7 +36,7 @@ exports[`Repository last commit component renders commit widget 1`] = `
>
>
<gl-link-stub
<gl-link-stub
class="commit-author-link js-user-link"
class="commit-author-link js-user-link"
href="
https://test.com
/test"
href="/test"
>
>
Test
Test
...
@@ -110,7 +110,7 @@ exports[`Repository last commit component renders the signature HTML as returned
...
@@ -110,7 +110,7 @@ exports[`Repository last commit component renders the signature HTML as returned
imgcssclasses=""
imgcssclasses=""
imgsize="40"
imgsize="40"
imgsrc="https://test.com"
imgsrc="https://test.com"
linkhref="
https://test.com
/test"
linkhref="/test"
tooltipplacement="top"
tooltipplacement="top"
tooltiptext=""
tooltiptext=""
username=""
username=""
...
@@ -124,7 +124,7 @@ exports[`Repository last commit component renders the signature HTML as returned
...
@@ -124,7 +124,7 @@ exports[`Repository last commit component renders the signature HTML as returned
>
>
<gl-link-stub
<gl-link-stub
class="commit-row-message item-title"
class="commit-row-message item-title"
href="
https://test.com
/commit/123"
href="/commit/123"
>
>
Commit title
Commit title
</gl-link-stub>
</gl-link-stub>
...
@@ -136,7 +136,7 @@ exports[`Repository last commit component renders the signature HTML as returned
...
@@ -136,7 +136,7 @@ exports[`Repository last commit component renders the signature HTML as returned
>
>
<gl-link-stub
<gl-link-stub
class="commit-author-link js-user-link"
class="commit-author-link js-user-link"
href="
https://test.com
/test"
href="/test"
>
>
Test
Test
...
...
spec/frontend/repository/components/last_commit_spec.js
View file @
11c53b94
...
@@ -12,11 +12,13 @@ function createCommitData(data = {}) {
...
@@ -12,11 +12,13 @@ function createCommitData(data = {}) {
titleHtml
:
'
Commit title
'
,
titleHtml
:
'
Commit title
'
,
message
:
'
Commit message
'
,
message
:
'
Commit message
'
,
webUrl
:
'
https://test.com/commit/123
'
,
webUrl
:
'
https://test.com/commit/123
'
,
webPath
:
'
/commit/123
'
,
authoredDate
:
'
2019-01-01
'
,
authoredDate
:
'
2019-01-01
'
,
author
:
{
author
:
{
name
:
'
Test
'
,
name
:
'
Test
'
,
avatarUrl
:
'
https://test.com
'
,
avatarUrl
:
'
https://test.com
'
,
webUrl
:
'
https://test.com/test
'
,
webUrl
:
'
https://test.com/test
'
,
webPath
:
'
/test
'
,
},
},
pipeline
:
{
pipeline
:
{
detailedStatus
:
{
detailedStatus
:
{
...
...
spec/frontend/repository/components/preview/__snapshots__/index_spec.js.snap
View file @
11c53b94
...
@@ -16,7 +16,7 @@ exports[`Repository file preview component renders file HTML 1`] = `
...
@@ -16,7 +16,7 @@ exports[`Repository file preview component renders file HTML 1`] = `
/>
/>
<gl-link-stub
<gl-link-stub
href="
http://test.com
"
href="
/test.md
"
>
>
<strong>
<strong>
README.md
README.md
...
...
spec/frontend/repository/components/preview/index_spec.js
View file @
11c53b94
...
@@ -31,6 +31,7 @@ describe('Repository file preview component', () => {
...
@@ -31,6 +31,7 @@ describe('Repository file preview component', () => {
it
(
'
renders file HTML
'
,
()
=>
{
it
(
'
renders file HTML
'
,
()
=>
{
factory
({
factory
({
webUrl
:
'
http://test.com
'
,
webUrl
:
'
http://test.com
'
,
webPath
:
'
/test.md
'
,
name
:
'
README.md
'
,
name
:
'
README.md
'
,
});
});
...
@@ -44,6 +45,7 @@ describe('Repository file preview component', () => {
...
@@ -44,6 +45,7 @@ describe('Repository file preview component', () => {
it
(
'
handles hash after render
'
,
()
=>
{
it
(
'
handles hash after render
'
,
()
=>
{
factory
({
factory
({
webUrl
:
'
http://test.com
'
,
webUrl
:
'
http://test.com
'
,
webPath
:
'
/test.md
'
,
name
:
'
README.md
'
,
name
:
'
README.md
'
,
});
});
...
@@ -60,6 +62,7 @@ describe('Repository file preview component', () => {
...
@@ -60,6 +62,7 @@ describe('Repository file preview component', () => {
it
(
'
renders loading icon
'
,
()
=>
{
it
(
'
renders loading icon
'
,
()
=>
{
factory
({
factory
({
webUrl
:
'
http://test.com
'
,
webUrl
:
'
http://test.com
'
,
webPath
:
'
/test.md
'
,
name
:
'
README.md
'
,
name
:
'
README.md
'
,
});
});
...
...
spec/graphql/types/commit_type_spec.rb
View file @
11c53b94
...
@@ -10,7 +10,7 @@ RSpec.describe GitlabSchema.types['Commit'] do
...
@@ -10,7 +10,7 @@ RSpec.describe GitlabSchema.types['Commit'] do
it
'contains attributes related to commit'
do
it
'contains attributes related to commit'
do
expect
(
described_class
).
to
have_graphql_fields
(
expect
(
described_class
).
to
have_graphql_fields
(
:id
,
:sha
,
:title
,
:description
,
:message
,
:title_html
,
:authored_date
,
:id
,
:sha
,
:title
,
:description
,
:message
,
:title_html
,
:authored_date
,
:author_name
,
:author_gravatar
,
:author
,
:web_url
,
:latest_pipeline
,
:author_name
,
:author_gravatar
,
:author
,
:web_
path
,
:web_
url
,
:latest_pipeline
,
:pipelines
,
:signature_html
:pipelines
,
:signature_html
)
)
end
end
...
...
spec/graphql/types/tree/blob_type_spec.rb
View file @
11c53b94
...
@@ -5,5 +5,5 @@ require 'spec_helper'
...
@@ -5,5 +5,5 @@ require 'spec_helper'
RSpec
.
describe
Types
::
Tree
::
BlobType
do
RSpec
.
describe
Types
::
Tree
::
BlobType
do
specify
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'Blob'
)
}
specify
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'Blob'
)
}
specify
{
expect
(
described_class
).
to
have_graphql_fields
(
:id
,
:sha
,
:name
,
:type
,
:path
,
:flat_path
,
:web_url
,
:lfs_oid
)
}
specify
{
expect
(
described_class
).
to
have_graphql_fields
(
:id
,
:sha
,
:name
,
:type
,
:path
,
:flat_path
,
:web_
path
,
:web_
url
,
:lfs_oid
)
}
end
end
spec/graphql/types/tree/tree_entry_type_spec.rb
View file @
11c53b94
...
@@ -5,5 +5,5 @@ require 'spec_helper'
...
@@ -5,5 +5,5 @@ require 'spec_helper'
RSpec
.
describe
Types
::
Tree
::
TreeEntryType
do
RSpec
.
describe
Types
::
Tree
::
TreeEntryType
do
specify
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'TreeEntry'
)
}
specify
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'TreeEntry'
)
}
specify
{
expect
(
described_class
).
to
have_graphql_fields
(
:id
,
:sha
,
:name
,
:type
,
:path
,
:flat_path
,
:web_url
)
}
specify
{
expect
(
described_class
).
to
have_graphql_fields
(
:id
,
:sha
,
:name
,
:type
,
:path
,
:flat_path
,
:web_
path
,
:web_
url
)
}
end
end
spec/graphql/types/user_type_spec.rb
View file @
11c53b94
...
@@ -16,6 +16,7 @@ RSpec.describe GitlabSchema.types['User'] do
...
@@ -16,6 +16,7 @@ RSpec.describe GitlabSchema.types['User'] do
username
username
avatarUrl
avatarUrl
webUrl
webUrl
webPath
todos
todos
state
state
authoredMergeRequests
authoredMergeRequests
...
...
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