app/helpers/shipit/stacks_helper.rb in shipit-engine-0.27.1 vs app/helpers/shipit/stacks_helper.rb in shipit-engine-0.28.0

- old
+ new

@@ -1,11 +1,9 @@ module Shipit module StacksHelper - COMMIT_TITLE_LENGTH = 79 - def redeploy_button(deployed_commit) - commit = UndeployedCommit.new(deployed_commit, 0) + commit = UndeployedCommit.new(deployed_commit, index: 0) url = new_stack_deploy_path(commit.stack, sha: commit.sha) classes = %W(btn btn--primary deploy-action #{commit.state}) unless commit.stack.deployable? classes.push(bypass_safeties? ? 'btn--warning' : 'btn--disabled') @@ -44,11 +42,11 @@ github_commit_url(commit) end end def render_commit_message(pull_request_or_commit) - message = pull_request_or_commit.title.to_s.truncate(COMMIT_TITLE_LENGTH) + message = pull_request_or_commit.title.to_s content_tag(:span, emojify(message), class: 'event-message') end def render_pull_request_title_with_link(pull_request) message = render_commit_message(pull_request) @@ -77,8 +75,16 @@ link_to("##{number}", github_pull_request_url(pull_request_or_commit), target: '_blank', class: 'number') end def render_raw_commit_id_link(commit) link_to(commit.short_sha, github_commit_url(commit), target: '_blank', class: 'number') + end + + def unlock_commit_tooltip(commit) + if commit.lock_author.present? + t('commit.unlock_with_author', author: commit.lock_author.name) + else + t('commit.unlock') + end end end end