phlegx / redmine_gitlab_hook

This plugin allows you to update your local Git repositories in Redmine when changes have been pushed to GitLab.
MIT License
218 stars 73 forks source link

Issue #45 adapt to Redmine 4.0 #48

Closed Dkstu closed 5 years ago

Dkstu commented 5 years ago

adapt to Redmine 4.0,

I don’t know rails, but I tried to support it with redmine 4.0. Please help confirm these changes.

octoquad commented 5 years ago

@Dkstu, I just upgraded to Redmine 4.0.3 from 3.4.6 and can confirm this patch works. Just on line 22 and 24, render(:plain => ... needs to be used instead of render(:text ... to fix a 500 Internal error

Completed 500 Internal Server Error in 1566ms (ActiveRecord: 0.7ms)

ActionView::MissingTemplate (Missing template gitlab_hook/index with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :rsb]}. Searched in:
  * "/home/redmine/redmine/plugins/redmine_gitlab_hook/app/views"
):

Environment: Redmine version 4.0.3.stable Ruby version 2.5.5-p157 (2019-03-15) [x86_64-linux] Rails version 5.2.3

Dkstu commented 5 years ago

@octoquad thanks for your feedback, i fixed it

phlegx commented 5 years ago

Hi @Dkstu! Thank you for the PR. Are this changes :text => :plain backward compatible?

Dkstu commented 5 years ago

Hi @phlegx I don’t know rails, so i can't unconfirmed.

phlegx commented 5 years ago

@Dkstu some of your changes are in the new release 4.0.0.