dentarg/dyno_metadata

Allow dynamic length for short_commit

Closed this issue · 1 comments

walro commented

7 is a great default for the length, but some projects need more (and some do with less), see git/git@e6c587c for some great background info. Something like:

def short_commit(length: 7)
  slug_commit[0, length]
end

Good suggestion. I'm thinking the keyword argument isn't necessary, example usage:

DynoMetadata.short_commit(12)