Commit Graph

95 Commits

Author SHA1 Message Date
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
http://jneen.net/ 7218daaa96 fix guard style 2016-12-22 00:10:35 -08:00
http://jneen.net/ 1b8a576d3f Be more certain in the comment 2016-12-21 09:51:42 -08:00
http://jneen.net/ f02f238d52 Revert "allow empty-quotes"
This reverts commit 4f2f678aff8d7dfcac96c47cf7eb480a5707ddaf.
2016-12-21 09:51:42 -08:00
http://jneen.net/ 5603127699 remove comment attribution 2016-12-21 09:51:41 -08:00
http://jneen.net/ 602c319862 allow empty-quotes 2016-12-21 09:51:41 -08:00
http://jneen.net/ 017579fe14 protect against EmailReplyTrimmer returning nil 2016-12-21 09:51:41 -08:00
http://jneen.net/ 03753ff146 remove trailing whitespace from email bodies 2016-12-21 09:51:41 -08:00
http://jneen.net/ a3bb2463c4 switch to email_reply_trimmer from discourse 2016-12-21 09:51:39 -08:00
Rydkin Maxim 170efaaba2 Enable Style/MultilineOperationIndentation in Rubocop, fixes #25741 2016-12-16 21:37:22 +03:00
http://jneen.net/ 9df189bb4a fix indentation for rubocop 2016-11-17 11:59:44 +09:00
http://jneen.net/ 4aabf707a9 rename `part` variable and guard against nil content_type 2016-11-17 11:59:44 +09:00
http://jneen.net/ 64e98040a7 completely remove blockquote and table tags 2016-11-17 11:59:44 +09:00
http://jneen.net/ b49a33ff6b use Nokogiri::HTML.parse instead of capitalized method 2016-11-17 11:59:44 +09:00
http://jneen.net/ 1734124433 fix rubocop failures 2016-11-17 11:59:44 +09:00
http://jneen.net/ f7b0692912 add parsing support for incoming html email 2016-11-17 11:59:44 +09:00
tiagonbotelho 011e561bfa implements reset incoming email token on issues modal and account page,
reactivates all tests and writes more tests for it
2016-11-07 15:56:18 +00: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
Douwe Maan 97dddf39cd Disable “issue by email” feature until it uses a different token 2016-08-19 19:49:12 -05: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 ec298011f2 Rails prefers require_dependency so that it won't require twice:
Closes #20724
2016-08-09 06:48:23 +00:00
Douwe Maan c008a1a967 Make Compare#diffs diff_options a regular argument 2016-08-03 09:32:01 -07:00
Paco Guzman c86c1905b5 switch from diff_file_collection to diffs
So we have raw_diffs too
2016-08-03 07:00:20 +02:00
Paco Guzman 1d0c7b7492 Introduce Compare model in the codebase.
This object will manage Gitlab::Git::Compare instances
2016-08-03 07:00:20 +02:00
Paco Guzman 8f359ea917 Move to Gitlab::Diff::FileCollection
Instead calling diff_collection.count use diff_collection.size which is cache on the diff_collection
2016-08-03 07:00:20 +02:00
Paco Guzman cd7c2cb6dd Cache highlighted diff lines for merge requests
Introducing the concept of SafeDiffs which relates 
diffs with UI highlighting.
2016-08-03 07:00:19 +02:00
Lin Jen-Shin 0f7851b7be Merge remote-tracking branch 'upstream/master' into new-issue-by-email
* upstream/master: (1547 commits)
  Add margin between buttons if both retry and cancel are present
  Add margin between labels; remove underline hover style on status button
  udpated JS based on feedback
  Use default cursor for table header of project files (!5165)
  Fix duplicated entry in changelog [ci skip]
  Improves left static sidebar behaviour
  Include default callback URL (OAuth)
  Cleanup feature proposal template
  Simplify regex for string-based multi-word label surrounded in quotes
  Revert "Merge branch '18193-developers-can-merge' into 'master'
"
  Upgrade Rails from 4.2.6 to 4.2.7.
  some JS magic to fix empty URL bug
  formats my test properly
  Update CHANGELOG
  Doesn't match empty label references surrounded in quotes
  Fix markdown rendering for label references that contains `.`
  Fix markdown rendering for label references that begin with a digit
  Fix markdown rendering for consecutive label references
  Stub omniauth provider for GitLab
  Update CHANGELOG
  ...
2016-07-15 15:30:26 +08:00
Douwe Maan 521a0a20f7 Allow reply-by-email with diff notes 2016-07-06 18:51:00 -04:00
Douwe Maan a9fa45f09e Represent DiffRefs as proper class instead of tuple array 2016-07-06 18:50:58 -04: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
Sean McGivern 1022a1678b Limit push email diff size
Limit push email diff size to 30 files or 150 KB, whichever comes first.
2016-06-17 08:55:05 +01: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 3ced5ae68e Save the list of handlers in a constant 2016-06-15 16:31:28 +08:00
Lin Jen-Shin 5608e1a159 Raise first like an input check 2016-06-15 16:23:41 +08:00
Lin Jen-Shin a01623882e Avoid assignment in if 2016-06-15 16:18:40 +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 e75391889e Merge branch 'master' into new-issue-by-email
* master: (1246 commits)
  Update CHANGELOG
  Update tests to make it work with Turbolinks approach
  Use Turbolink instead of ajax
  Reinitialize checkboxes to toggle event bindings
  Turn off handlers before binding events
  Removed console.log Uses outerWidth instead of width
  Revert "Added API endpoint for Sidekiq Metrics"
  Added API endpoint for Sidekiq Metrics
  Added CHANGELOG entry for allocations Gem/name fix
  Filter out classes without names in the sampler
  Update the allocations Gem to 1.0.5
  Put all sidebar icons in fixed width container
  Instrument private/protected methods
  Fix Ci::Build#artifacts_expire_in= when assigning invalid duration
  Fix grammar and syntax
  Update CI API docs
  UI and copywriting improvements
  Factorize members mails into a new Emails::Members module
  Factorize access request routes into a new :access_requestable route concern
  Factorize #request_access and #approve_access_request  into a new AccessRequestActions controller concern
  ...
2016-06-15 15:43:12 +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 ee548b6ed0 Only set @raw for receiver, and handle the rest in execute 2016-05-20 19:03:39 -05:00