Skip to content

Commit

Permalink
bump checkout action and remove https kludge
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettrowell committed May 3, 2024
1 parent b5b7d46 commit bf0d0ed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion features/auto_vendored.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions lib/onceover/vendored_modules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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('[email protected]:', '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"
Expand Down

0 comments on commit bf0d0ed

Please sign in to comment.