module LogCabin::Modules::GitlabTag

Pull state from a Gitlab tag

Public Instance Methods

load!() click to toggle source
# File lib/prospectus/modules/gitlab_tag.rb, line 13
def load!
  raise('No repo specified') unless @repo
  @state.value = regex_helper(tag)
end

Private Instance Methods

tag() click to toggle source
# File lib/prospectus/modules/gitlab_tag.rb, line 27
def tag
  @tag = filter_helper(tags).first
end
tags() click to toggle source
# File lib/prospectus/modules/gitlab_tag.rb, line 20
def tags
  @tags ||= gitlab_api.tags(@repo).sort do |*points|
    dates = points.map { |x| Date.parse(x.commit.committed_date) }
    dates.last <=> dates.first
  end.map(&:name)
end