Coder Social home page Coder Social logo

nathanvda / exception_notification-redmine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nuxos-asia/exception_notification-redmine

0.0 2.0 0.0 9 KB

This gem add a Redmine notifier to Exception Notification.

License: MIT License

Ruby 80.16% HTML 19.84%

exception_notification-redmine's Introduction

ExceptionNotification::Redmine

This gem add a Redmine notifier to Exception Notification.

This Ruby gem is an extension of the exception_notification gem to support creating issues in Redmine.

Gem Version

Installation

Add this line to your application's Gemfile:

gem 'exception_notification-redmine'

And then execute:

$ bundle

Or install it yourself as:

$ gem install exception_notification-redmine

Usage

IMPORTANT: You must create a custom field named x_checksum in your Redmine project for the Redmine notifier to work properly

As of Rails 3 ExceptionNotification-Redmine is used as a rack middleware, or in the environment you want it to run. In most cases you would want ExceptionNotification-Redmine to run on production. Thus, you can make it work by putting the following lines in your config/environments/production.rb:

Whatever::Application.config.middleware.use ExceptionNotification::Rack,
  # host_url: url of your Redmine host
  # issues_url: issues.json (Redmine REST API)
  # issues_prefix: text prepended to the issue title (default: "[Error]")
  # api_key: the api key of the user that will be used to create the Redmine issue
  # project_id: create issues in the project with the given id, where id is either project_id or project identifier
  # tracker_id: create issues with the given tracker_id
  # assigned_to_id: create issues which are assigned to the given user_id
  # priority_id: create issues with the given priority_id
  # status_id: create issues with the given status_id
  # x_checksum_cf_id: custom field used to avoid creation of the same issue multiple times. You must use the DOM id assigned by Redmine to this field in the issue form. You can find it by creating an issue manually in your project and inspecting the HTML form, you should see something like name="issue[custom_field_values][19]", in this case the id would be 19.
  
  :redmine => {
    :host_url => "https://redmine.example.com",
    :issues_url => "issues.json",
    :issues_prefix => "[Error]",
    :api_key => "123456",
    :project_id => "test-project",
    :tracker_id => "1", # Bug
    :assigned_to_id => "123",
    :priority_id => "6", # Urgent
    :status_id => "1", # New
    :x_checksum_cf_id => "19" # DOM id in Redmine issue form
  }

Contributing

  1. Fork it ( https://github.com/Nuxos-Asia/exception_notification-redmine/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

exception_notification-redmine's People

Contributors

nathanvda avatar ricp avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.