diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb index 20b4ed46d0a26e8446dd24f06bc73485fc25724e..cb2420f9042bdfa6b13ce307a244efd4c8073fd7 100644 --- a/app/controllers/projects/environments_controller.rb +++ b/app/controllers/projects/environments_controller.rb @@ -75,10 +75,9 @@ class Projects::EnvironmentsController < Projects::ApplicationController include: { last_deployment: { include: { - user: { only: [:id, :name, :username], methods: [:avatar_url] }, - deployable: { only: [:id, :name, :ref, :tag] } + user: { only: [:id, :name, :username], methods: [:avatar_url] } }, - methods: [:short_sha, :commit_title, :commit] + methods: [:short_sha, :commit_title, :deployable, :commit] } } ) diff --git a/app/views/projects/environments/components/_commit.html.haml b/app/views/projects/environments/components/_commit.html.haml index 3395b2fa2406b21088c3cf64bd88ef2186d3bee6..b10a2e483ba2057c08e6fa7f598fb96eea8a174d 100644 --- a/app/views/projects/environments/components/_commit.html.haml +++ b/app/views/projects/environments/components/_commit.html.haml @@ -9,19 +9,24 @@ =icon("code-fork") %a.monospace.branch-name{":href" => ""} + -# need commits branch name url {{model.last_deployment.ref}} .icon-container.commit-icon = custom_icon("icon_commit") %a.commit-id.monospace{":href" => ""} + -# need commit url built with commit sha {{model.last_deployment.short_sha}} - {{model.last_deployment.sha}} %p.commit-title %span{ "v-if" => "model.last_deployment.commit_title"} + + -# need commit author username and avatar_url + commit author goes here %a.commit-row-message{":href" => ""} + -# need commit url built with commit sha {{model.last_deployment.commit_title}} %span{ "v-if" => "!model.last_deployment.commit_title"}