Sha256: 39fd7f8efa03b6e5508f72cdfd0a425fbdf830b091e4767b3c62b8cc963aef2a
Contents?: true
Size: 587 Bytes
Versions: 14
Compression:
Stored size: 587 Bytes
Contents
# frozen_string_literal: true require 'forwardable' module GFSM module Data class Commit extend Forwardable attr_reader :category, :trailer_key, :subject def initialize(commit, trailer_key, category) @commit = commit @trailer_key = trailer_key @category = category @subject = commit.message.lines.first.chomp end def short_sha(length = 7) self.sha[0, length] end def to_changelog_entry "#{subject} (#{short_sha})" end delegate %i[message sha] => :@commit end end end
Version data entries
14 entries across 14 versions & 1 rubygems