Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#902) Check for github_changelog_generator in proper bundler context #907

Merged
merged 1 commit into from
Aug 22, 2020

Conversation

scotje
Copy link
Contributor

@scotje scotje commented Aug 22, 2020

Previously, the code was checking for the github_changelog_generator gem
in the PDK's execution environment, but then invoking the gem in the
module's execution environment. This change updates the code to check
for the gem in the module's execution environment by invoking bundle show.

…dler context

Previously, the code was checking for the github_changelog_generator gem
in the PDK's execution environment, but then invoking the gem in the
module's execution environment. This change updates the code to check
for the gem in the module's execution environment by invoking `bundle
show`.
@scotje scotje requested a review from a team as a code owner August 22, 2020 00:35
@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 92.649% when pulling f54ad9e on scotje:fix_changelog_check into c178798 on puppetlabs:master.

@scotje scotje merged commit ff04521 into puppetlabs:master Aug 22, 2020
@scotje scotje deleted the fix_changelog_check branch August 22, 2020 01:00
@kenyon
Copy link
Contributor

kenyon commented Mar 14, 2021

This PR just changed the error message slightly, but as a user, still isn't very helpful. The Do you want to run the automatic changelog generation? question is a standard part of pdk release prep`, so why not include the gem in PDK by default, and provide some documentation on how to use this?

Initially running pdk release prep I got pdk (ERROR): Unable to generate the changelog as the github_changelog_generator gem is not included in this module's Gemfile. So I did pdk bundle add github_changelog_generator. Next run of pdk release prep I got

/home/kenyon/.pdk/cache/ruby/2.7.0/gems/github_changelog_generator-1.15.2
rake aborted!
Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'
/home/kenyon/git/puppet-bind/Rakefile:48:in `block in <top (required)>'
/home/kenyon/.pdk/cache/ruby/2.7.0/gems/github_changelog_generator-1.15.2/lib/github_changelog_generator/task.rb:42:in `define'
/home/kenyon/.pdk/cache/ruby/2.7.0/gems/github_changelog_generator-1.15.2/lib/github_changelog_generator/task.rb:36:in `initialize'
/home/kenyon/git/puppet-bind/Rakefile:47:in `new'
/home/kenyon/git/puppet-bind/Rakefile:47:in `<top (required)>'
/opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/opt/puppetlabs/pdk/private/ruby/2.7.2/bin/bundle:23:in `load'
/opt/puppetlabs/pdk/private/ruby/2.7.2/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)
pdk (ERROR): Error generating changelog:

🤷

@jpogran
Copy link
Contributor

jpogran commented Mar 15, 2021

@kenyon I referenced your comment in a new issue so that this isn't lost in a pull request closed a long time ago. Please use that issue for a further discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants