From bf0d0ed888b66c34a9c8f0e7fcd5d6e54b446872 Mon Sep 17 00:00:00 2001 From: Garrett Rowell Date: Fri, 3 May 2024 12:23:43 -0400 Subject: [PATCH] bump checkout action and remove https kludge --- .github/workflows/tests.yaml | 2 +- features/auto_vendored.feature | 2 +- lib/onceover/vendored_modules.rb | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 796b54e..3dfc129 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -22,7 +22,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} diff --git a/features/auto_vendored.feature b/features/auto_vendored.feature index 87b8f69..75d0b56 100644 --- a/features/auto_vendored.feature +++ b/features/auto_vendored.feature @@ -15,7 +15,7 @@ Feature: Automatically resolve modules vendored with puppet-agent package Scenario: Auto resolve enabled and Puppetfile empty Given existing control repo "vendored" When I run onceover command "run spec --auto_vendored=true" with class "role::cron" - Then the temporary Puppetfile should contain /mod 'puppetlabs-cron_core',\n.*git: 'https://github.com/puppetlabs\/puppetlabs-cron_core.git',\n.*ref: 'refs\/tags\/.*'/ + Then the temporary Puppetfile should contain /mod 'puppetlabs-cron_core',\n.*git: 'git@github.com:puppetlabs\/puppetlabs-cron_core.git',\n.*ref: 'refs\/tags\/.*'/ And I should not see any errors Scenario: Auto resolve enabled and cron_core specified in Puppetfile diff --git a/lib/onceover/vendored_modules.rb b/lib/onceover/vendored_modules.rb index fa56bb2..e808610 100644 --- a/lib/onceover/vendored_modules.rb +++ b/lib/onceover/vendored_modules.rb @@ -121,10 +121,7 @@ def puppetfile_missing_vendored(puppetfile) # array of modules whos names match existing = puppetfile.modules.select { |e_mod| e_mod.name == mod_name } if existing.empty? - # Change url to https instead of ssh to avoid 'Host key verification failed' errors - # https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints - url = mod['url'].gsub('git@github.com:', 'https://github.com/') - @missing_vendored << {mod_slug => {git: url, ref: mod['ref']}} + @missing_vendored << {mod_slug => {git: mod['url'], ref: mod['ref']}} logger.debug "#{mod_name} found to be missing in Puppetfile" else logger.debug "#{mod_name} found in Puppetfile. Using the specified version"