Redmine的Webhook是由一个叫做redmine_webhook的插件来完成的,这个插件在首页就写着由于Redmine的hook的缺失,使用右键编辑issue的时候,其是无法获得到事件的,也就没法发送webhook。我是真的没想到,在这个hook缺失了8年之后的今天,这个hook还是没人给加上。这下只能自己加了。
找到app/controllers/issues_controller.rb,修改这一行
call_hook(:controller_issues_bulk_edit_before_save, { :params => params, :issue => issue }) if issue.save saved_issues << issue else
改为:
call_hook(:controller_issues_bulk_edit_before_save, { :params => params, :issue => issue }) if issue.save call_hook(:controller_issues_bulk_edit_after_save, { :params => params, :issue => issue, :journal => issue.current_journal }) saved_issues << issue else
接着,将插件替换为这个修改过的版本:https://github.com/AdmanTIC/redmine_webhook,重启redmine就完事了。
0 条评论