Error when post request received from Bitbucket

Issue #5 new
Wallace created an issue
TypeError (Project 'My Project Name' has no repository):
  plugins/redmine_bitbucket_git/app/controllers/bitbucketgit_hook_controller.rb:24:in `index'
  actionpack (3.2.19) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.19) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.19) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.19) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  ...

My solution is change in app/controllers/bitbucketgit_hook_controller.rb from

    searchPath = Dir.getwd + '/' + Setting.plugin_redmine_bitbucket_git[:bitbucketgit_dir].to_s + '/' + payload['repository']['owner'] + '_' + payload['repository']['name'] +'.git'

to

    searchPath = Dir.getwd + '/' + Setting.plugin_redmine_bitbucket_git[:bitbucketgit_dir].to_s + '/' + payload['repository']['owner'] + '_' + payload['repository']['slug'] +'.git'

Comments (0)

  1. Log in to comment