sindresorhus / awesome-lint

Linter for Awesome lists
MIT License
600 stars 56 forks source link

v0.18.4 broke linting from forks #172

Closed rsamborski closed 11 months ago

rsamborski commented 11 months ago

Latest v0.18.4 release seems to have broken linting of code coming in from forks, examples:

As a workaround I had to lock to previous version (v0.18.3) which passes correctly - see here

sindresorhus commented 11 months ago

// @hyperupcall

hyperupcall commented 11 months ago

I am able to reproduce - working on a fix

hyperupcall commented 11 months ago

This broke linting because the code did not take into account that HEAD may not point to a branch - it could be in a detached state. And this commonly occurs in Github Actions when @actions/checkout is used to clone a repository.

The linked issue fixes this by:

  1. Reading the config key clone.defaultRemoteName
  2. If that config key was not set, then it is defaulted to origin (the original default)
rsamborski commented 11 months ago

@hyperupcall Thank you for a super fast fix. I have tested and confirmed that v0.18.5 works correctly with our repository.