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
af7c5ef5
Commit
af7c5ef5
authored
4 years ago
by
Nicolò Maria Mezzopera
Committed by
Luke Duncalfe
4 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add visibility level to container_registry_type
- source - tests Co-authored-by:
Steve Abrams
<
sabrams@gitlab.com
>
parent
d402a774
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64 additions
and
3 deletions
+64
-3
app/graphql/types/container_repository_type.rb
app/graphql/types/container_repository_type.rb
+5
-0
changelogs/unreleased/216795-add-visibility-and-last-published-information-to-the-image-reposit.yml
...y-and-last-published-information-to-the-image-reposit.yml
+5
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+10
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+36
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+2
-0
spec/fixtures/api/schemas/graphql/container_repository.json
spec/fixtures/api/schemas/graphql/container_repository.json
+4
-1
spec/graphql/types/container_repository_details_type_spec.rb
spec/graphql/types/container_repository_details_type_spec.rb
+1
-1
spec/graphql/types/container_repository_type_spec.rb
spec/graphql/types/container_repository_type_spec.rb
+1
-1
No files found.
app/graphql/types/container_repository_type.rb
View file @
af7c5ef5
...
...
@@ -19,9 +19,14 @@ module Types
field
:status
,
Types
::
ContainerRepositoryStatusEnum
,
null:
true
,
description:
'Status of the container repository.'
field
:tags_count
,
GraphQL
::
INT_TYPE
,
null:
false
,
description:
'Number of tags associated with this image.'
field
:can_delete
,
GraphQL
::
BOOLEAN_TYPE
,
null:
false
,
description:
'Can the current user delete the container repository.'
field
:project
,
Types
::
ProjectType
,
null:
false
,
description:
'Project of the container registry'
def
can_delete
Ability
.
allowed?
(
current_user
,
:update_container_image
,
object
)
end
def
project
Gitlab
::
Graphql
::
Loaders
::
BatchModelLoader
.
new
(
Project
,
object
.
project_id
).
find
end
end
end
This diff is collapsed.
Click to expand it.
changelogs/unreleased/216795-add-visibility-and-last-published-information-to-the-image-reposit.yml
0 → 100644
View file @
af7c5ef5
---
title
:
Add Project to ContainerRepository GraphQL type
merge_request
:
49019
author
:
type
:
added
This diff is collapsed.
Click to expand it.
doc/api/graphql/reference/gitlab_schema.graphql
View file @
af7c5ef5
...
...
@@ -3415,6 +3415,11 @@ type ContainerRepository {
"""
path
:
String
!
"""
Project
of
the
container
registry
"""
project
:
Project
!
"""
Status
of
the
container
repository
.
"""
...
...
@@ -3520,6 +3525,11 @@ type ContainerRepositoryDetails {
"""
path
:
String
!
"""
Project
of
the
container
registry
"""
project
:
Project
!
"""
Status
of
the
container
repository
.
"""
...
...
This diff is collapsed.
Click to expand it.
doc/api/graphql/reference/gitlab_schema.json
View file @
af7c5ef5
...
...
@@ -9274,6 +9274,24 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "project",
"description": "Project of the container registry",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "Project",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "status",
"description": "Status of the container repository.",
...
...
@@ -9575,6 +9593,24 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "project",
"description": "Project of the container registry",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "Project",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "status",
"description": "Status of the container repository.",
This diff is collapsed.
Click to expand it.
doc/api/graphql/reference/index.md
View file @
af7c5ef5
...
...
@@ -553,6 +553,7 @@ A container repository.
|
`location`
| String! | URL of the container repository. |
|
`name`
| String! | Name of the container repository. |
|
`path`
| String! | Path of the container repository. |
|
`project`
| Project! | Project of the container registry |
|
`status`
| ContainerRepositoryStatus | Status of the container repository. |
|
`tagsCount`
| Int! | Number of tags associated with this image. |
|
`updatedAt`
| Time! | Timestamp when the container repository was updated. |
...
...
@@ -571,6 +572,7 @@ Details of a container repository.
|
`location`
| String! | URL of the container repository. |
|
`name`
| String! | Name of the container repository. |
|
`path`
| String! | Path of the container repository. |
|
`project`
| Project! | Project of the container registry |
|
`status`
| ContainerRepositoryStatus | Status of the container repository. |
|
`tags`
| ContainerRepositoryTagConnection | Tags of the container repository |
|
`tagsCount`
| Int! | Number of tags associated with this image. |
...
...
This diff is collapsed.
Click to expand it.
spec/fixtures/api/schemas/graphql/container_repository.json
View file @
af7c5ef5
{
"type"
:
"object"
,
"required"
:
[
"id"
,
"name"
,
"path"
,
"location"
,
"createdAt"
,
"updatedAt"
,
"tagsCount"
,
"canDelete"
,
"expirationPolicyCleanupStatus"
],
"required"
:
[
"id"
,
"name"
,
"path"
,
"location"
,
"createdAt"
,
"updatedAt"
,
"tagsCount"
,
"canDelete"
,
"expirationPolicyCleanupStatus"
,
"project"
],
"properties"
:
{
"id"
:
{
"type"
:
"string"
...
...
@@ -35,6 +35,9 @@
"expirationPolicyCleanupStatus"
:
{
"type"
:
"string"
,
"enum"
:
[
"UNSCHEDULED"
,
"SCHEDULED"
,
"UNFINISHED"
,
"ONGOING"
]
},
"project"
:
{
"type"
:
"object"
}
}
}
This diff is collapsed.
Click to expand it.
spec/graphql/types/container_repository_details_type_spec.rb
View file @
af7c5ef5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
RSpec
.
describe
GitlabSchema
.
types
[
'ContainerRepositoryDetails'
]
do
fields
=
%i[id name path location created_at updated_at expiration_policy_started_at status tags_count can_delete expiration_policy_cleanup_status tags]
fields
=
%i[id name path location created_at updated_at expiration_policy_started_at status tags_count can_delete expiration_policy_cleanup_status tags
project
]
it
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'ContainerRepositoryDetails'
)
}
...
...
This diff is collapsed.
Click to expand it.
spec/graphql/types/container_repository_type_spec.rb
View file @
af7c5ef5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
RSpec
.
describe
GitlabSchema
.
types
[
'ContainerRepository'
]
do
fields
=
%i[id name path location created_at updated_at expiration_policy_started_at status tags_count can_delete expiration_policy_cleanup_status]
fields
=
%i[id name path location created_at updated_at expiration_policy_started_at status tags_count can_delete expiration_policy_cleanup_status
project
]
it
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'ContainerRepository'
)
}
...
...
This diff is collapsed.
Click to expand it.
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