Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Updated by Naglis Jonaitis about 7 years ago

Since upgrade to 7.4.3 the [OpenProject Github Integration Plugin](https://github.com/finnlabs/openproject-github_integration) has stopped functioning (we are using Docker image based installation).

## Steps to reproduce the bug

\- The webhooks plugin and the OpenProject Github Integration Plugin are installed.

\- A “GitHub” role with *View work packages* and *Add notes* work package tracking permissions is setup and a “GitHub Bot” user is added on a project with the created GitHub role.

\- An API key is generated for the “GitHub Bot” user and then used to setup a webhook on a GitHub repository for *Pull requests* and *Issue comments* events, where the webhook request content type is `application/json` and the payload URL is in the following format: `https://<openproject_instance>/webhooks/github?key=<github_bot_api_key>`
\- A PR is created or commented for this repo on GitHub with a URL of a work package in the OpenProject instance.

## Actual behavior

\- No message by GitHub Bot is posted on the work package in the OpenProject instance.

\- GitHub webhook delivieries show a “500 Internal server error” for the requests.
\- Error I see in the logs when the webhook is called:

App 1642 stdout: Can't verify CSRF token authenticity.
App 1642 stdout:
App 1642 stdout: RuntimeError (Github action handle_hook for event pull_request not supported.):
App 1642 stdout:
App 1642 stdout: lib/open_project/notifications.rb:57:in `block in subscribe'
App 1642 stdout: lib/open_project/notifications.rb:75:in `send'
App 1642 stdout: app/middleware/reset_current_user.rb:47:in `call'
App 6445 stdout:

## Expected behavior

\- Comment is posted on the work package on the OpenProject instance informing about the opened/closed pull request.

## Additional information

I have tested these Docker images: 7.4.3, 7.4.1, 7.4.0.

In 7.4.0 it works if the webhook payload is wrapped in `{"webhook": {...}}` and it stops working in 7.4.1 when the payload is no longer wrapped. So my guess would be that it stopped working after changes in [deee0ce](https://github.com/finnlabs/openproject-github_integration/commit/deee0cef06321361a7f15981aab40878074cc2ce).

Back

Loading...