tf / redmine_merge_request_links

Display links to associated Gitlab merge requests and GitHub pull requests on Redmine's issue page.
https://www.redmine.org/plugins/redmine_merge_request_links
MIT License
35 stars 26 forks source link
github gitlab merge-requests pull-requests redmine redmine-plugin webhooks

Redmine Merge Request Links

Tests

Display links to associated merge requests and pull requests on Redmine's issue page.

Intercepts webhooks and parses merge request descriptions for mentioned issue ids.

The following platforms are supported:

Requirements

Installation

Copy plugin directoy to {RAILS_APP}/plugins on your Redmine path. Run plugin migrations from your redmine root directory:

$ rake redmine:plugins:migrate RAILS_ENV=production

This plugin requires an additional view hook which can be added by applying a patch to your Redmine instance. From your Redmine path run:

$ git apply plugins/redmine_merge_request_links/patches/view_hook_issues_show_after_details_redmine_3.4.patch

or if you use EasyRedmine

$ git apply plugins/redmine_merge_request_links/patches/view_hook_issues_show_after_details_easyredmine.patch

One of the following environment variables need to be set:

If you use systemd set appropriate environment variable:

https://serverfault.com/a/413408

They must contain secrets which have to be configured in GitLab/GitHub to authenticate webhooks.

Export the environment variable(s) in your bash or webserver config. Examples with Phusion Passenger webserver can be found here: https://www.phusionpassenger.com/library/indepth/environment_variables.html

Finally, restart your webserver.

Configuration

Create a webhook in GitLab or GitHub as described here:

GitLab

GitHub

Gitea

Redmine

To display associated merge requests on issue pages:

Usage

Create a merge request and reference a Redmine issue either in the form #123 or REDMINE-123. See a link to the merge request appear on the issue's Redmine page.

Known Issues

Development

After checking out the repository, run

$ bin/build

to build the Docker container used to run the test suite.

Then run

$ bin/test

to run the test suite inside a Docker container.

License

The gem is available as open source under the terms of the MIT License.