Commit graph

22 commits

Author SHA1 Message Date
Adam Pahlevi
a0586dbc16 replace find_with_namespace with find_by_full_path
add complete changelog for !8949
2017-02-03 07:14:04 +07:00
Pawel Chojnacki
c3a940000e Handles unsubscribe from notifications via email
- allows unsubscription processing of email in format "reply+%{key}+unsubscribe@acme.com" (example)
- if config.address includes %{key} and replies are enabled every unsubscriable message will include mailto: link in its List-Unsubscribe header
2017-01-13 10:11:46 -05:00
Douwe Maan
9d51421346 Use separate email-friendly token for incoming email and let incoming
email token be reset
2016-11-07 15:55:42 +00:00
Lin Jen-Shin
a4ef4244d4 Preserve note_type and position for notes from emails
Closes #23208
2016-10-20 16:18:53 +08:00
Rémy Coutable
0eea8c8857 Support slash commands in noteable description and notes
Some important things to note:

- commands are removed from noteable.description / note.note
- commands are translated to params so that they are treated as normal
  params in noteable Creation services
- the logic is not in the models but in the Creation services, which is
  the right place for advanced logic that has nothing to do with what
  models should be responsible of!
- UI/JS needs to be updated to handle notes which consist of commands
  only
- the `/merge` command is not handled yet

Other improvements:

- Don't process commands in commit notes and display a flash is note is only commands
- Add autocomplete for slash commands
- Add description and params to slash command DSL methods
- Ensure replying by email with a commands-only note works
- Use :subscription_event instead of calling noteable.subscribe
- Support :todo_event in IssuableBaseService

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:05:57 +02:00
Lin Jen-Shin
176fa21cb7 raise UnknownIncomingEmail when there's no mail_key:
So that we don't have to pretend that CreateNoteHandler
could handle a nil mail_key. Also, since NilClass#=~ would
just return nil for any regular expression, we could just
match it without checking nilness.

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3363#note_12566407
2016-06-20 19:15:54 +08:00
Lin Jen-Shin
0671db52a8 Use keyword args to be more clear:
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3363#note_12566374
2016-06-20 19:11:42 +08:00
Lin Jen-Shin
c491f66952 Use a separate line for separate actions:
Feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3363#note_12420487
2016-06-20 17:58:05 +08:00
Lin Jen-Shin
09c38e46e5 Only pass item name 2016-06-15 20:10:16 +08:00
Lin Jen-Shin
9417814970 More space for private concern 2016-06-15 19:41:31 +08:00
Lin Jen-Shin
fcc6a59247 Blank line for private 2016-06-15 16:18:31 +08:00
Lin Jen-Shin
3b64c4f9d6 A blank line to separate exception raising 2016-06-15 16:16:44 +08:00
Lin Jen-Shin
4c09871450 Avoid using bang bang 2016-06-15 16:15:49 +08:00
Lin Jen-Shin
72184c16ab Rename to project_path which is more accurate 2016-06-15 15:54:04 +08:00
Lin Jen-Shin
cb168c347a Remove empty lines at the beginning of files 2016-06-15 15:47:40 +08:00
Lin Jen-Shin
1f5d55907a Merge the places where exceptions could be raised 2016-05-24 01:23:07 +08:00
Lin Jen-Shin
863d8e5ae5 use split and try to unify error raising 2016-05-23 22:16:40 +08:00
Lin Jen-Shin
c64cd113cc Add ! for verify_record! because it could raise 2016-05-21 09:46:27 -07:00
Lin Jen-Shin
75415663f8 Rename handlers and introduce Handler.for 2016-05-21 09:40:08 -07:00
Lin Jen-Shin
c2bc15a766 Use the authentication_token for finding the user 2016-05-20 17:38:08 -05:00
Lin Jen-Shin
a7c823a573 Give ProjectNotFound when the project is not readable 2016-05-18 17:57:14 -05:00
Lin Jen-Shin
c337e748d3 so we use separate classes to handle different tasks 2016-05-18 17:25:45 -05:00