# frozen_string_literal: true

# As part of https://gitlab.com/groups/gitlab-org/-/epics/4826 we are
# vendoring workhorse commits from the stand-alone gitlab-workhorse
# repo. There is no point in linting commits that we want to vendor as
# is.
def workhorse_changes?
  git.diff.any? { |file| file.path.start_with?('workhorse/') }
end

commit_messages.lint_commits(git.commits) unless workhorse_changes?
