unsplash / comment-on-pr

A GitHub Action to comment on the relevant open PR when a commit is pushed.
MIT License
150 stars 84 forks source link

Builds failing with v1.3.1 #51

Open impressiver opened 2 years ago

impressiver commented 2 years ago

Upgrading to unsplash/comment-on-pr@v1.3.1 causes our builds to fail w/ the following error:

/entrypoint.sh:5:in `require_relative': cannot load such file -- /lib/github (LoadError)
    from /entrypoint.sh:5:in `<main>'

Downgrading to unsplash/comment-on-pr@v1.3.0 fixed our builds for now.

aaronklaassen commented 2 years ago

I don't have time to address this right now but reverted the breaking PR on master in the meantime.

nubcake94 commented 2 years ago

@aaronklaassen 1.3.0 breaks as well now with the following error image

drewbrew commented 2 years ago

FWIW, 1.2.0 builds but does not run:

/usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- /usr/local/bundle/gems/faraday-1.9.0/lib/faraday/request/retry (LoadError)
    from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/bundle/gems/octokit-4.21.0/lib/octokit/default.rb:28:in `block in <module:Default>'
    from /usr/local/bundle/gems/faraday-1.9.0/lib/faraday/rack_builder.rb:76:in `build'
    from /usr/local/bundle/gems/faraday-1.9.0/lib/faraday/rack_builder.rb:65:in `initialize'
    from /usr/local/bundle/gems/octokit-4.21.0/lib/octokit/default.rb:27:in `new'
    from /usr/local/bundle/gems/octokit-4.21.0/lib/octokit/default.rb:27:in `<module:Default>'
    from /usr/local/bundle/gems/octokit-4.21.0/lib/octokit/default.rb:9:in `<module:Octokit>'
    from /usr/local/bundle/gems/octokit-4.21.0/lib/octokit/default.rb:6:in `<top (required)>'
    from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/bundle/gems/octokit-4.21.0/lib/octokit.rb:4:in `<top (required)>'
    from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
    from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
    from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
    from /entrypoint.sh:4:in `<main>'
/usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- octokit (LoadError)
    from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /entrypoint.sh:4:in `<main>'
kirach commented 2 years ago

looks like 1.3.0 stopped working too due to the same error @drewbrew posted above

impressiver commented 2 years ago

looks like 1.3.0 stopped working too due to the same error @drewbrew posted above

Broke for us too for a short time this morning, but builds are building again pinned to v1.3.0

jbuettnerbild commented 2 years ago

v1.3.0 stopped working since yesterday and v1.3.1 dosnt work also. Please fix this.

drewbrew commented 2 years ago

builds are building again pinned to v1.3.0

Same here, luckily

dgrenner commented 2 years ago

@aaronklaassen, would it be possible to create a new tag (v1.3.2) from master? With automatic dependency updates (using Renovate bot / dependabot) it's easy to end up on v1.3.1.

wblondel commented 2 years ago

A new tag would indeed be really useful.

ruudk commented 2 years ago

For anyone trying to work around this broken action, I decided to use the gh cli instead:

-   name: Add comment on PR
    run: |
        cat << EOF | gh pr comment ${{ github.event.pull_request.number }} --body-file -
        Hello from
        GitHub Actions
        EOF
    env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Unfortunately, there is no duplication check in the gh cli.

sjortiz commented 1 year ago

any updates?

Lockyy commented 1 year ago

This also broke our deploys when we upgraded from 1.3.0 to 1.3.1 with the error from the OP:

To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
/entrypoint.sh:5:in `require_relative': cannot load such file -- /lib/github (LoadError)
    from /entrypoint.sh:5:in `<main>'

Reverting to 1.3.0 fixed the issue.

I noticed looking through the commits for the change from 1.3.0 to 1.3.1 that there's been a major refactor, would that be worthy of a major/minor version bump rather than a patch version change.