diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 27e83c7..d18d283 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2024-10-18 15:57:43 UTC using RuboCop version 1.66.1. +# on 2024-10-21 10:03:50 UTC using RuboCop version 1.66.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -27,4 +27,4 @@ RSpec/VerifiedDoubles: # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. # URISchemes: http, https Layout/LineLength: - Max: 173 + Max: 174 diff --git a/lib/action.rb b/lib/action.rb index 68fe72f..3e308df 100644 --- a/lib/action.rb +++ b/lib/action.rb @@ -26,7 +26,7 @@ def initiate_version_update(level) else add_reaction('confused') puts "::error title=Unknown semver level::The semver level #{level} is not valid" - "## :boom: Error:boom: \n\nThe semver level #{level} is not valid so failing the action. Expecting a semver level of #{VALID_SEMVER_LEVELS.join(', ')}" + "### :boom: Error:boom: \n\nThe semver level #{level} is not valid so failing the action. Expecting a semver level of #{VALID_SEMVER_LEVELS.join(', ')}" end end diff --git a/lib/command.rb b/lib/command.rb index 97f510e..835616d 100644 --- a/lib/command.rb +++ b/lib/command.rb @@ -10,12 +10,12 @@ class Command def initialize(config) @config = config - @message = "### Dobby bumping the version\n" + @message = "## Dobby bumping the version\n" comment = config.payload['comment']['body'].strip.downcase unless comment.start_with?(COMMAND_PREFIX) error_msg = "Comment must start with #{COMMAND_PREFIX}" puts "::error title=Argument Error::#{error_msg}" - @message += "## :boom: Error:boom:\n\n The comment must start with #{COMMAND_PREFIX} so failing the action." + @message += "### :boom: Error:boom:\n\n The comment must start with #{COMMAND_PREFIX} so failing the action." raise ArgumentError, error_msg end @@ -30,7 +30,7 @@ def call when 'version' @message += action.initiate_version_update(options).to_s else - @message += "## :boom: Error:boom:\n\nThe command #{command} is not valid so failing the action. Expecting a command of 'version'." + @message += "### :boom: Error:boom:\n\nThe command #{command} is not valid so failing the action. Expecting a command of 'version'." puts "::error title=Unknown command::The command #{command} is not valid" action.add_reaction('confused') end diff --git a/lib/utils/bump.rb b/lib/utils/bump.rb index 9e10f9f..8d396c8 100644 --- a/lib/utils/bump.rb +++ b/lib/utils/bump.rb @@ -70,12 +70,12 @@ def bump_version(version, level) def generate_message(files_messages) message = "### Bump version from #{@version} to #{@updated_version}\n" + message += "Dobby has attempted to update the following files\n" message += "| File Name | Message |\n" message += "|-----------|---------|\n" files_messages.each do |file_name, msg| message += "| #{file_name} | #{msg} |\n" end - message += "|-----------|---------|\n" message end end diff --git a/spec/lib/action_spec.rb b/spec/lib/action_spec.rb index 07faecd..2dc5a4e 100644 --- a/spec/lib/action_spec.rb +++ b/spec/lib/action_spec.rb @@ -36,7 +36,7 @@ it 'reacts with confused emoji for invalid semver' do expect(action).to receive(:add_reaction).with('confused') message = action.initiate_version_update('invalid_semver') - expect(message).to eq("## :boom: Error:boom: \n\nThe semver level invalid_semver is not valid so failing the action. Expecting a semver level of minor, major, patch") + expect(message).to eq("### :boom: Error:boom: \n\nThe semver level invalid_semver is not valid so failing the action. Expecting a semver level of minor, major, patch") end it 'bumps major version' do diff --git a/temp.md b/temp.md index 0115fc5..5b675af 100644 --- a/temp.md +++ b/temp.md @@ -1,4 +1,4 @@ -### Dobby bumping the version -## :boom: Error:boom: +## Dobby bumping the version +### :boom: Error:boom: The command barney is not valid so failing the action. Expecting a command of 'version'.