This plugin allows you to update your local Git repositories in Redmine when changes have been pushed to GitLab.
Redmine has supported Git repositories for a long time, allowing you to browse your code and view your changesets directly in Redmine. For this purpose, Redmine relies on local clones of the Git repositories.
If your shared repository is on a remote machine - for example on GitLab - this unfortunately means a bit of legwork to keep the local, Redmine-accessible repository up-to-date. The common approach is to set up a cronjob that pulls in any changes with regular intervals and updates Redmine with them.
That approach works perfectly fine, but is a bit heavy-handed and cumbersome. The Redmine GitLab Hook plugin allows GitLab to notify your Redmine installation when changes have been pushed to a repository, triggering an update of your local repository and Redmine data only when it is actually necessary.
Installing the plugin
Setup Git repository sync
clone --mirror
please turn on the option all_branches
in the plugin config page.Setup Redmine repository
repository
module and add a new repository. Repository identifier is composed with {repository_namespace}_{repository_name}
.test
in repository namespace business
with repository name redmine
results in business_redmine
as repository identifier.redmine
.test
.redmine
.Setup GitLab Web hook
{redmine_installation_url}/gitlab_hook?key={redmine_repository_API_key}&project_id={redmine_project_identifier}
Example:
That's it. GitLab will now send a HTTP POST to the Redmine GitLab Hook plugin whenever changes are pushed to GitLab. The plugin then takes care of pulling the changes to the local repository and updating the Redmine database with them.
To debug the API interface of redmine_gitlab_hook try out RESTClient a nice add-on for Chrome, Firefox and Safari. Please keep in mind, that the request method must be of type POST!
clone --mirror
command (default: off, please turn on in options when new mirror command was used).git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)The MIT License
Copyright (c) 2019 Phlegx Systems OG
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。