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

Updateing redmine git repository / No redmine git update on branche #49

Open toples opened 5 years ago

toples commented 5 years ago

Hi guys, first I have to say that you have done an amazing job!

My configuration

Redmine version         4.0.3.stable
redmine_gitlab_hook 4.0.0
GitLab          12.1.1 

I had to change the following line in _plugins/redmine_gitlab_hook/app/controllers/gitlab_hookcontroller.rb in order to sync the changes of my master branch from the gitlab repository to redmine ( I use ssh for pulling the changes ):

if Setting.plugin_redmine_gitlab_hook['all_branches'] == 'yes'
      # fetch --all didnt do anything :-(
      # command = git_command(prefix, "fetch --all#{prune}", repository)
      command = git_command(prefix, "pull", repository)

      logger.debug { "a) Command: #{command}, #{prefix}, #{repository}" }
      exec(command)

Now when I push changes from my local master branch to remote master branch ( even the refs # @

Now if I create an addition branch for ex. "bugs" and i push it from my local to the remote, I can see the branch in gitlab, but in redmineI only see the master branch ( the log file of redmine doenst show any activities, when I push on my second branch "bugs" ).

This is what I see in redmine terminal when I do an git branch -a

redmine@dev:~/redmine/git/p1$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/bugs
  remotes/origin/feature
  remotes/origin/master

and yet redmine repository browser, shows me only the master.

Could you give me some input here, what should I do in this case?