help needed with making Redmine-Git integration working
Added by Kirill Marchuk over 8 years ago
Hi all
Another person is maintaining Redmine server for my company. Thus, he was doing the integration according to these pieces:
- http://www.redmine.org/projects/redmine/wiki/HowTo_Easily_integrate_a_%28SSH_secured%29_GIT_repository_into_redmine
- http://www.redmine.org/projects/redmine/wiki/RedmineRepositories#Git-repository ("Setting up a mirror repository")
Also, repository configuration is also applied on project level (I need 3 repos bound to 1 RM project) and user mapping is configured for each project; also, "Enable time logging" and keywords are configured as well. Crontab job to "git fetch" is scheduled for every 5 minutes
What works:
- There's a Repository tab on a Project page, where I can see repositories, bound to the project; and for every repository on tha page - the File tree and latest revision (BUT it only displays "master" branch) and "All revisions" (which also displays other branches)
What does NOT work:
- I don't see any SCM-related information on the Issue page
- Time-logging does not work, although we use commit messages like "fixed bug in new gulpfile.js #8432 @0h10m"
The problem might be related to the fact that we NEVER commit to master, every changeset is committed to feature-branch[es] first, and only upon deployment (which we have not yet done) it will be merged to master.
How do we troubleshoot the issue ? Many thanks for your support!
EDIT: meanwhile, I've figured out that we have commit info in "changesets" table on the DB, but no records in "changesets_issues" table.
Questions:
1) is it a requirement to use any of the "Referencing keywords" on the commit ? I thought using "#dddd" is enough..
2) how exactly does "Fetch commits automatically" work ?
The /admin/info is as follows:
Environment: Redmine version 2.6.9.stable Ruby version 2.1.8-p440 (2015-12-16) [amd64-freebsd10] Rails version 3.2.22 Environment production Database adapter PostgreSQL SCM: Git 2.7.4 Filesystem Redmine plugins: a_common_libs 1.1.3 csv_import_issues 0.0.2 custom_menu 1.0.0 extra_queries 0.0.1 global_roles 1.0.0 luxury_buttons 3.2.0 magic_my_page 1.1.0 my_projects 1.3 redmine_agile 1.3.8 redmine_checklists 3.0.4 redmine_ckeditor 1.0.20 redmine_daily_status 0.0.1 redmine_favorite_projects 1.0.1 redmine_issue_detailed_tabs_time 0.1.0 redmine_lightbox 0.0.1 redmine_open_links_in_new_window 0.0.3 redmine_people 0.1.8 redmine_questions 0.0.5 redmine_tags 2.1.0 redmine_theme_changer 0.1.0 redmine_work_time 0.2.16 rm_user_mentions 0.0.1 sidebar_hide 0.0.7 unread_issues 1.0.0 usability 1.0.0
Replies (2)
RE: help needed with making Redmine-Git integration working - Added by Kirill Marchuk over 8 years ago
Seems like it is necessary to call /sys/fetch_changesets?key=<key>. At least, afterwards I can see revisions added to an issue, and time logged accordingly. And yet, we're using "refs" keyword now, although it seems from regular expression that this is not strictly necessary.
RE: help needed with making Redmine-Git integration working - Added by Kirill Marchuk over 8 years ago
Another update:
- if you add a "*" to a list of "referencing keywords", then #ddd issue number will be processed wherever it is in a commit message;
As of the "Fetch commits automatically" setting: we've turned it off, and added a "curl /sys/fetch_changesets" call into a cronjob that updates git repos.
So far, it seems to be working, and time is logged; and it does not matter which branch is the commit on.
Thanks everyone for their support!