solidusio / solidus_dev_support

A collection of tools for developing Solidus extensions.
MIT License
21 stars 27 forks source link

Add a missing require for octokit/repository #185

Closed elia closed 2 years ago

elia commented 2 years ago

Summary

The Repository constant is not autoloaded nor eagerly loaded in Octokit v4.23.

While running rake clobber (from bin/setup) on my copy of solidus_subscription the following error was shown:

⤑ bin/rake clobber --trace                                                                              ~/C/N/solidus_subscriptions
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
rake aborted!
NameError: uninitialized constant Octokit::Repository

        repo = Octokit::Repository.from_url(gemspec.metadata['source_code_uri'] || gemspec.homepage)
                      ^^^^^^^^^^^^
/Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/solidus_dev_support-2.5.3/lib/solidus_dev_support/rake_tasks.rb:81:in `block in install_changelog_task'
/Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/github_changelog_generator-1.16.4/lib/github_changelog_generator/task.rb:43:in `define'
/Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/github_changelog_generator-1.16.4/lib/github_changelog_generator/task.rb:37:in `initialize'
/Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/solidus_dev_support-2.5.3/lib/solidus_dev_support/rake_tasks.rb:79:in `new'
/Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/solidus_dev_support-2.5.3/lib/solidus_dev_support/rake_tasks.rb:79:in `install_changelog_task'
/Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/solidus_dev_support-2.5.3/lib/solidus_dev_support/rake_tasks.rb:26:in `install'
<internal:kernel>:90:in `tap'
…

Checklist

mergify[bot] commented 2 years ago

It looks like this PR is missing a label to determine the type of change it introduces. The maintainer should add one of the following labels:

Additionally, the maintainer may also want to add one of the following:

Once the correct labels have been set, simply remove the needs changelog label label from this PR so I can merge it.

waiting-for-dev commented 2 years ago

It'll be fixed upstream when https://github.com/octokit/octokit.rb/pull/1420 is merged.

waiting-for-dev commented 2 years ago

Thanks, @elia!! :heart: