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

Unable to comment on PR created by a dependabot #48

Open Rafi993 opened 2 years ago

Rafi993 commented 2 years ago
  1. I have a workflow that runs when a PR is created by any user. This workflow works fine.
  2. But when a PR is created by Dependabot the github action fails. It fails with following error
WARNING: `Faraday::Connection#authorization` is deprecated; it will be removed in version 2.0.
While initializing your connection, use `#request(:authorization, ...)` instead.
See https://lostisland.github.io/faraday/middleware/authentication for more usage info.
/usr/local/bundle/gems/octokit-4.21.0/lib/octokit/response/raise_error.rb:14:in `on_complete': POST https://api.github.com/repos/pushowl/cdn.pushowl.com/issues/650/comments: 403 - Resource not accessible by integration // See: https://docs.github.com/rest/reference/issues#create-an-issue-comment (Octokit::Forbidden)
    from /usr/local/bundle/gems/faraday-1.8.0/lib/faraday/middleware.rb:19:in `block in call'
    from /usr/local/bundle/gems/faraday-1.8.0/lib/faraday/response.rb:59:in `on_complete'
    from /usr/local/bundle/gems/faraday-1.8.0/lib/faraday/middleware.rb:18:in `call'
    from /usr/local/bundle/gems/octokit-4.21.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
    from /usr/local/bundle/gems/octokit-4.21.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
    from /usr/local/bundle/gems/faraday-1.8.0/lib/faraday/request/retry.rb:148:in `call'
    from /usr/local/bundle/gems/faraday-1.8.0/lib/faraday/rack_builder.rb:154:in `build_response'
    from /usr/local/bundle/gems/faraday-1.8.0/lib/faraday/connection.rb:516:in `run_request'
    from /usr/local/bundle/gems/faraday-1.8.0/lib/faraday/connection.rb:281:in `post'
    from /usr/local/bundle/gems/sawyer-0.8.2/lib/sawyer/agent.rb:94:in `call'
    from /usr/local/bundle/gems/octokit-4.21.0/lib/octokit/connection.rb:156:in `request'
    from /usr/local/bundle/gems/octokit-4.21.0/lib/octokit/connection.rb:28:in `post'
    from /usr/local/bundle/gems/octokit-4.21.0/lib/octokit/client/issues.rb:284:in `add_comment'
    from /entrypoint.sh:68:in `<main>'
  1. When I trigger the workflow again manually for that PR it succeeds
  2. Is this some permission issue ?
amitksingh1490 commented 2 years ago

+1

lianup commented 2 years ago

+1