@@ -1,59 +1,5 | |||||
1 | #!/usr/bin/env ruby |
|
1 | #!/usr/bin/env ruby | |
2 |
|
2 | |||
3 | # == Synopsis |
|
|||
4 | # |
|
|||
5 | # Reads an email from standard input and forward it to a Redmine server |
|
|||
6 | # through a HTTP request. |
|
|||
7 | # |
|
|||
8 | # == Usage |
|
|||
9 | # |
|
|||
10 | # rdm-mailhandler [options] --url=<Redmine URL> --key=<API key> |
|
|||
11 | # |
|
|||
12 | # == Arguments |
|
|||
13 | # |
|
|||
14 | # -u, --url URL of the Redmine server |
|
|||
15 | # -k, --key Redmine API key |
|
|||
16 | # |
|
|||
17 | # General options: |
|
|||
18 | # --unknown-user=ACTION how to handle emails from an unknown user |
|
|||
19 | # ACTION can be one of the following values: |
|
|||
20 | # ignore: email is ignored (default) |
|
|||
21 | # accept: accept as anonymous user |
|
|||
22 | # create: create a user account |
|
|||
23 | # --no-permission-check disable permission checking when receiving |
|
|||
24 | # the email |
|
|||
25 | # --key-file=PATH path to a file that contains the Redmine |
|
|||
26 | # API key (use this option instead of --key |
|
|||
27 | # if you don't the key to appear in the |
|
|||
28 | # command line) |
|
|||
29 | # --no-check-certificate do not check server certificate |
|
|||
30 | # -h, --help show this help |
|
|||
31 | # -v, --verbose show extra information |
|
|||
32 | # -V, --version show version information and exit |
|
|||
33 | # |
|
|||
34 | # Issue attributes control options: |
|
|||
35 | # -p, --project=PROJECT identifier of the target project |
|
|||
36 | # -s, --status=STATUS name of the target status |
|
|||
37 | # -t, --tracker=TRACKER name of the target tracker |
|
|||
38 | # --category=CATEGORY name of the target category |
|
|||
39 | # --priority=PRIORITY name of the target priority |
|
|||
40 | # -o, --allow-override=ATTRS allow email content to override attributes |
|
|||
41 | # specified by previous options |
|
|||
42 | # ATTRS is a comma separated list of attributes |
|
|||
43 | # |
|
|||
44 | # == Examples |
|
|||
45 | # No project specified. Emails MUST contain the 'Project' keyword: |
|
|||
46 | # |
|
|||
47 | # rdm-mailhandler --url http://redmine.domain.foo --key secret |
|
|||
48 | # |
|
|||
49 | # Fixed project and default tracker specified, but emails can override |
|
|||
50 | # both tracker and priority attributes using keywords: |
|
|||
51 | # |
|
|||
52 | # rdm-mailhandler --url https://domain.foo/redmine --key secret \\ |
|
|||
53 | # --project foo \\ |
|
|||
54 | # --tracker bug \\ |
|
|||
55 | # --allow-override tracker,priority |
|
|||
56 |
|
||||
57 | require 'net/http' |
|
3 | require 'net/http' | |
58 | require 'net/https' |
|
4 | require 'net/https' | |
59 | require 'uri' |
|
5 | require 'uri' |
General Comments 0
You need to be logged in to leave comments.
Login now