This is a Plugin for one-way integration between GitHub & Redmine. This plugin has a scheduled task that can run at a customizable interval to fetch all projects & issues from a GitHub account and save them in Redmine.
- Syncs GitHub projects with Redmine projects
- Syncs GitHub issues in each project with Redmine issues in the corresponding project
- Syncs GitHub issue comments with Redmine issue notes
- Syncs GitHub issue assignee with Redmine issue assignee
This plugin requires Redmine 5.0.0 or higher. The previous versions of Redmine are not supported. The plugin is tested with Redmine 5.1.1, but it should work with any Redmine version that uses Rails 6.x or higher.
The personal access token must be created from Github Developer Settings.
The following permissions are required:
Issues - Access: Read-Only
- to read issuesMetadata - Access: Read-Only
- Mandatory in order to be able to read Issues
Projects - Access: Read-Only
- to read projects
-
Clone the plugin source code into
plugins/github_integration
:git clone `https://github.com/techhive-solutions/redmine-github-integration` `plugins/github_integration`
-
Switch to branch
scheduler
:cd plugins/github_integration git checkout scheduler cd -
-
Install the dependencies
bundle install
-
Migrate the database
bundle exec rake redmine:plugins:migrate
Add the gem as dependency in Gemfile.local file. If the file doesn't exist, you need to create it.
gem 'sidekiq'
Run bundle install
to install the gem
Create a config file config/sidekiq.yml
with the following content:
---
:logfile: log/sidekiq.log
:queues:
- mailers
- default
:scheduler:
:dynamic: true
Create config/additional_environment.rb file if the file does not exist by copying the existing example file:
cp config/additional_environment.rb.example config/additional_environment.rb
Add the following line to the config/additional_environment.rb file:
config.active_job.queue_adapter = :sidekiq
Restart Redmine to apply the changes
Browse to Information tab from Redmine Administration page and check the mailer queue value:
Mailer queue ActiveJob::QueueAdapters::SidekiqAdapter
-
Follow the official steps described in https://github.com/mperham/sidekiq/wiki/Deployment#running-your-own-process
-
The above steps points to a sidekiq.service example file which can be used to configure the service
-
During service configuration, at least the following information must be provided:
- WorkingDirectory
- User
- Group
-
Enable and start the service
sudo systemctl enable sidekiq sudo systemctl start sidekiq
-
Test again the configuration as described in 2.5
- Restart Redmine
- Go to
Administration > Plugins > GitHub Integration plugin > Configure
- Enter the GitHub credentials:
- Enter the GitHub organization name
- Enter the GitHub personal access token, created as per the Credentials section
- Enter the sync interval in hours
- Click
Apply
- This saves the settings but the sync is not started yet.
- In the
Schedule the Sync Process
section, clickSchedule Now
to schedule the process.