Commit b5a73b1f902c97c3289df159b1007eb4a0db9eac
1 parent
9b7dd8b4
Exists in
spb-stable
and in
2 other branches
Expose archive status of projects in API
That way clients like Gitlab CI can decide to show or hide projects based on that information
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
lib/api/entities.rb
@@ -43,6 +43,7 @@ module API | @@ -43,6 +43,7 @@ module API | ||
43 | class Project < Grape::Entity | 43 | class Project < Grape::Entity |
44 | expose :id, :description, :default_branch | 44 | expose :id, :description, :default_branch |
45 | expose :public?, as: :public | 45 | expose :public?, as: :public |
46 | + expose :archived?, as: :archived | ||
46 | expose :visibility_level, :ssh_url_to_repo, :http_url_to_repo, :web_url | 47 | expose :visibility_level, :ssh_url_to_repo, :http_url_to_repo, :web_url |
47 | expose :owner, using: Entities::UserBasic, unless: ->(project, options) { project.group } | 48 | expose :owner, using: Entities::UserBasic, unless: ->(project, options) { project.group } |
48 | expose :name, :name_with_namespace | 49 | expose :name, :name_with_namespace |