• Stars
    star
    147
  • Rank 251,347 (Top 5 %)
  • Language
    Ruby
  • Created over 10 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Redmine WebHook Plugin

A Redmine plugin posts webhook on creating and updating tickets.

Author

  • @suer

Install

Type below commands:

$ cd $RAILS_ROOT/plugins
$ git clone https://github.com/suer/redmine_webhook.git
$ rake redmine:plugins:migrate RAILS_ENV=production

Then, restart your redmine.

Post Data Example

Issue opened

{
  "payload": {
    "issue": {
      "author": {
        "icon_url": "http://www.gravatar.com/avatar/example",
        "identity_url": null,
        "lastname": "user",
        "firstname": "test",
        "mail": "[email protected]",
        "login": "test",
        "id": 3
      },
      "assignee": {
        "icon_url": "http://www.gravatar.com/avatar/example",
        "identity_url": null,
        "lastname": "user",
        "firstname": "test",
        "mail": "[email protected]",
        "login": "test",
        "id": 3
      },
      "priority": {
        "name": "normal",
        "id": 2
      },
      "tracker": {
        "name": "bug",
        "id": 1
      },
      "parent_id": null,
      "root_id": 191,
      "closed_on": null,
      "updated_on": "2014-03-01T15:17:48Z",
      "created_on": "2014-03-01T15:17:48Z",
      "description": "I'm having a problem with this.",
      "subject": "Found a bug",
      "id": 191,
      "done_ratio": 0,
      "start_date": "2014-03-02",
      "due_date": null,
      "estimated_hours": null,
      "is_private": false,
      "lock_version": 0,
      "project": {
        "homepage": "",
        "created_on": "2013-01-12T11:50:26Z",
        "description": "",
        "name": "Test Project",
        "identifier": "test",
        "id": 4
      },
      "status": {
        "name": "new",
        "id": 1
      }
    },
    "action": "opened",
    "url": "https://example.com"
  }
}

Issue updated

{
  "payload": {
    "url": "https://example.com",
    "journal": {
      "details": [],
      "author": {
        "icon_url": "http://www.gravatar.com/avatar/example",
        "identity_url": null,
        "lastname": "user",
        "firstname": "test",
        "mail": "[email protected]",
        "login": "test",
        "id": 3
      },
      "assignee": {
        "icon_url": "http://www.gravatar.com/avatar/example",
        "identity_url": null,
        "lastname": "user",
        "firstname": "test",
        "mail": "[email protected]",
        "login": "test",
        "id": 3
      },
      "private_notes": false,
      "created_on": "2014-03-01T16:22:46Z",
      "notes": "Fixed",
      "id": 195
    },
    "issue": {
      "author": {
        "icon_url": "http://www.gravatar.com/avatar/example",
        "identity_url": null,
        "lastname": "user",
        "firstname": "test",
        "mail": "[email protected]",
        "login": "test",
        "id": 3
      },
      "priority": {
        "name": "normal",
        "id": 2
      },
      "tracker": {
        "name": "bug",
        "id": 1
      },
      "parent_id": null,
      "root_id": 196,
      "closed_on": null,
      "updated_on": "2014-03-01T16:22:46Z",
      "created_on": "2014-03-01T15:44:22Z",
      "description": "test",
      "subject": "Found a bug",
      "id": 196,
      "done_ratio": 0,
      "start_date": "2014-03-02",
      "due_date": null,
      "estimated_hours": null,
      "is_private": false,
      "lock_version": 2,
      "project": {
        "homepage": "",
        "created_on": "2013-01-12T11:50:26Z",
        "description": "",
        "name": "Test Project",
        "identifier": "test",
        "id": 4
      },
      "status": {
        "name": "normal",
        "id": 1
      }
    },
    "action": "updated"
  }
}

Requirements

  • Redmine 4.0 or later

Skipping webhooks

When a webhook triggers a change via REST API, this would trigger another webhook. If you need to prevent this, the API request can include the X-Skip-Webhooks header, which will prevent webhooks being triggered by that request.

Known Limitations

An update from context menu doesn't call a webhook event. It is caused by a lack of functionality hooking in Redmine. Please see #4 for details.

This limitation has been affected on all Redmine versions includes 2.4, 2.6, and 3.0. It is not fixed in end of April, 2015.

License

The MIT License (MIT) Copyright (c) suer

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

redmine_absolute_dates

Redmineの作成日、更新日などの相対表現表示を絶対表現になおすプラグイン
Ruby
40
star
2

redmine_ms_projects

Ruby
26
star
3

redmine_issues_summary_graph

redmine_issues_summary_graph
Ruby
23
star
4

redmine_export_with_journals

Export CSV with history
Ruby
20
star
5

wsdl2kotlin

An implementation of WSDL stub code generator for Kotlin.
Kotlin
15
star
6

redmine_workflow_viz

visualization of workflow definition on redmine
Ruby
13
star
7

redmine_milkode

Ruby
12
star
8

redmine_enter_cancel

Ruby
11
star
9

omniauth-redmine

Strategy to authenticate with Redmine via OAuth in Redmine
Ruby
11
star
10

redmine_incr_code_search

Redmine plugin to search files in repository incrementally
Ruby
10
star
11

redmine_glanceyear

A Redmine plugin to show activities by glanceyear
Ruby
10
star
12

redmine_emoji

This plugin adds :emoji: syntax to all Wiki formatting of Redmine
Ruby
10
star
13

redmine_my_search

HTML
8
star
14

redmine_readme

Ruby
8
star
15

fastforward-chrome

Opera-like Fast-Forward Keyboard Shortcut for Google Chrome
JavaScript
6
star
16

redmine_paste_as_markdown_tables

Paste as Markdown-style tables from Excel format text
HTML
5
star
17

redmine_japanese_help

replace redmine help link to japanese guide (Redmine.jp)
Ruby
4
star
18

redmine_websocket_notifier

Redmine websocket notifer plugin
Ruby
4
star
19

redmine_attachments_size

Disk Usage Plugin
Ruby
2
star
20

redmine_debeso_wiki_macro

Ruby
2
star
21

tiffencoder.as

Tiff Encoder for Action Script 3
ActionScript
2
star
22

redmine_post_script

Ruby
2
star
23

RSapid

ソフトウェアを統計解析するためのプラットフォーム
C
2
star
24

redmine_bitbucketgit_hook

cloned from https://bitbucket.org/3100/redmine_bitbucketgit_hook
Ruby
1
star
25

asakusa-satellite-plugin

Jenkins AsakusaSatellite Notifier
Java
1
star
26

redmine-notifier-for-chrome

A Redmine Activity Notifier via WebSocket
JavaScript
1
star
27

Test-Setup-Project

C#
1
star
28

test

test repository
1
star
29

redmine_admin_class

Add "admin" class to body tag if you are admin
Ruby
1
star
30

flashlight-things-plugin

Add tasks to Things using Spotlight
Python
1
star
31

suer.github.com

suer.github.io
HTML
1
star