Skip to content

Commit 5f5b439

Browse files
GbArcAndriiMyskogbarc-dt
authored
[TBT-96] - new representations for collections (#1334)
* Enable representations for collections * minimal repr. for repo but with build included --------- Co-authored-by: AndriiMysko <[email protected]> Co-authored-by: GbArc <[email protected]>
1 parent dca028a commit 5f5b439

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/travis/api/v3/collection_renderer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def filtered_include
6868
end
6969

7070
def representation
71-
:standard
71+
params['representation']&.to_sym || :standard
7272
end
7373

7474
def render_entry(entry, **options)

lib/travis/api/v3/renderer/repository.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ class Renderer::Repository < ModelRenderer
44
representation(:standard, :id, :name, :slug, :description, :github_id, :vcs_id, :vcs_type, :github_language, :active, :private, :owner, :owner_name, :vcs_name, :default_branch, :starred, :managed_by_installation, :active_on_org, :migration_status, :history_migration_status, :shared, :config_validation, :server_type, :scan_failed_at)
55
representation(:experimental, :id, :name, :slug, :description, :vcs_id, :vcs_type, :github_id, :github_language, :active, :private, :owner, :default_branch, :starred, :current_build, :last_started_build, :next_build_number, :server_type, :scan_failed_at)
66
representation(:internal, :id, :name, :slug, :github_id, :vcs_id, :vcs_type, :active, :private, :owner, :default_branch, :private_key, :token, :user_settings, :server_type, :scan_failed_at)
7+
representation(:list, :id, :name, :slug, :active, :private, :owner, :vcs_id, :vcs_type, :server_type)
8+
representation(:minimal_with_build, :id, :name, :slug, :active, :private, :owner, :vcs_id, :vcs_type, :server_type, :managed_by_installation, :last_started_build, :current_build)
79
representation(:additional, :allow_migration)
810

911
hidden_representations(:experimental, :internal)

0 commit comments

Comments
 (0)