Method: Codebot::Formatters::Gitlab::JobHook#format_commit

Defined in:
lib/codebot/formatters/gitlab_job_hook.rb

#format_commit(commit) ⇒ Object



65
66
67
68
69
70
71
72
73
# File 'lib/codebot/formatters/gitlab_job_hook.rb', line 65

def format_commit(commit)
  '%<repository>s/%<branch>s %<hash>s %<author>s: %<title>s' % {
    repository: format_repository(repo_name),
    branch: format_branch(branch),
    hash: format_hash(commit['id']),
    author: format_user(author(commit)),
    title: prettify(commit['message'])
  }
end