summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRiccardo Padovani <riccardo@rpadovani.com>2018-04-09 09:39:03 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-04-09 09:39:03 +0000
commitf68aab1945679f76a0e9a51069cdc4f41e11821d (patch)
tree6d3528666b98e5b9cea3773fb951663adbb2d09b /doc
parenta2a6a5cab66c2cfec6b770d070187badfd505b62 (diff)
downloadgitlab-ce-f68aab1945679f76a0e9a51069cdc4f41e11821d.tar.gz
Make email handler clearer
Diffstat (limited to 'doc')
-rw-r--r--doc/development/emails.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/development/emails.md b/doc/development/emails.md
index 4dbf064fd75..73cac82caf0 100644
--- a/doc/development/emails.md
+++ b/doc/development/emails.md
@@ -74,6 +74,24 @@ See the [Rails guides] for more info.
1. Reply by email should now be working.
+## Email namespace
+
+If you need to implement a new feature which requires a new email handler, follow these rules:
+
+ - You must choose a namespace. The namespace cannot contain `/` or `+`, and cannot match `\h{16}`.
+ - If your feature is related to a project, you will append the namespace **after** the project path, separated by a `+`
+ - If you have different actions in the namespace, you add the actions **after** the namespace separated by a `+`. The action name cannot contain `/` or `+`, , and cannot match `\h{16}`.
+ - You will register your handlers in `lib/gitlab/email/handler.rb`
+
+Therefore, these are the only valid formats for an email handler:
+
+ - `path/to/project+namespace`
+ - `path/to/project+namespace+action`
+ - `namespace`
+ - `namespace+action`
+
+Please note that `path/to/project` is used in GitLab Premium as handler for the Service Desk feature.
+
---
[Return to Development documentation](README.md)