From ec516a229afbedb0eefe401a8eefecc27004f6ac Mon Sep 17 00:00:00 2001 From: Bobosila Victor Date: Fri, 24 Sep 2021 13:18:41 +0300 Subject: (MODULES-11197) Update puppetlabs-augeas_core to latest pdk template Also updated `.sync` file to include the `auto_release.yml` workflow --- Rakefile | 41 +++++++++-------------------------------- 1 file changed, 9 insertions(+), 32 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 7f91a3f..23e44bf 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +require 'bundler' require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any? require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-syntax/tasks/puppet-syntax' @@ -50,7 +53,7 @@ if Bundler.rubygems.find_name('github_changelog_generator').any? config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)." config.add_pr_wo_labels = true config.issues = false - config.merge_prefix = "### UNCATEGORIZED PRS; GO LABEL THEM" + config.merge_prefix = "### UNCATEGORIZED PRS; LABEL THEM ON GITHUB" config.configure_sections = { "Changed" => { "prefix" => "### Changed", @@ -58,11 +61,11 @@ if Bundler.rubygems.find_name('github_changelog_generator').any? }, "Added" => { "prefix" => "### Added", - "labels" => ["feature", "enhancement"], + "labels" => ["enhancement", "feature"], }, "Fixed" => { "prefix" => "### Fixed", - "labels" => ["bugfix"], + "labels" => ["bug", "documentation", "bugfix"], }, } end @@ -70,42 +73,16 @@ else desc 'Generate a Changelog from GitHub' task :changelog do raise <= Gem::Version.new('2.2.2')" + version: '~> 1.15' + condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')" EOM end end -desc "verify that commit messages match CONTRIBUTING.md requirements" -task(:commits) do - # This rake task looks at the summary from every commit from this branch not - # in the branch targeted for a PR. - commit_range = 'HEAD^..HEAD' - puts "Checking commits #{commit_range}" - %x{git log --no-merges --pretty=%s #{commit_range}}.each_line do |commit_summary| - # This regex tests for the currently supported commit summary tokens. - # The exception tries to explain it in more full. - if /^\((maint|packaging|doc|docs|modules-\d+)\)|revert/i.match(commit_summary).nil? - raise "\n\n\n\tThis commit summary didn't match CONTRIBUTING.md guidelines:\n" \ - "\n\t\t#{commit_summary}\n" \ - "\tThe commit summary (i.e. the first line of the commit message) should start with one of:\n" \ - "\t\t(MODULES-) # this is most common and should be a ticket at tickets.puppet.com\n" \ - "\t\t(docs)\n" \ - "\t\t(docs)(DOCUMENT-)\n" \ - "\t\t(packaging)\n" - "\t\t(maint)\n" \ - "\n\tThis test for the commit summary is case-insensitive.\n\n\n" - else - puts "#{commit_summary}" - end - puts "...passed" - end -end -- cgit v1.2.3