Commit graph

21 commits

Author SHA1 Message Date
Gabriel Mazetto
8f178c4222 Prevent new / renamed project from using a repository path that already exists on disk
There are some redundancies in the validation steps, and that is to
preserve current error messages behavior

Also few specs have to be changed in order to fix madness in validation
logic.
2017-08-25 20:06:06 +02:00
Sean McGivern
27d34789c9 Merge branch '28472-ignore-auto-generated-mails' into 'master'
Don't send rejection mails for all auto-generated mails

Closes #28472

See merge request !13254
2017-08-03 12:41:16 +00:00
Robert Speicher
72a7b30c9f Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
Lin Jen-Shin
f097e4dbcd Don't send rejection mails for all auto-generated mails
Also make it easier to have mailer helper
2017-08-03 00:40:10 +08:00
Robert Speicher
9513bd18c4 Ensure all project factories use :repository trait or :empty_project 2017-08-01 14:51:52 -04:00
Rémy Coutable
ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Eric Eastwood
ea090291bb Rename "Slash commands" to "Quick actions"
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/27070

Deprecate "chat commands" in favor of "slash commands"

We looked for things like:

 - `slash commmand`
 - `slash_command`
 - `slash-command`
 - `SlashCommand`
2017-06-15 09:01:56 -05:00
Douwe Maan
79889a6aa3
Add specs 2017-04-05 17:44:14 +01:00
Lin Jen-Shin
0786894473 Merge remote-tracking branch 'upstream/master' into fix-references-header-parsing
* upstream/master: (574 commits)
  remove dateFormat global exception
  fix relative paths to xterm.js within fit.js
  use setFixtures instead of fixture.set
  prevent u2f tests from triggering a form submission while testing
  simplify test for focus state
  preload projects.json fixture
  preload projects.json fixture
  rework tests which rely on teaspoon-specific behavior
  Only render hr when user can't archive project.
  use setFixtures instead of fixture.set
  ensure helper classes and constants are exposed globally
  preload projects.json fixture
  fix fixture references in environments_spec
  allow console.xxx in tests, reorder eslint rules alphabetically
  remove redundant "data-toggle" attribute so Vue doesn't complain
  fix broken reference to formatDate in a CommonJS environment
  fix errors within gl_dropdown_spec.js when running in Karma
  fix intermittant errors in merge_commit_message_toggle_spec.rb
  Update installation docs to include Docker, others
  ignore node_modules in rubocop
  ...
2017-02-03 17:16:21 +08:00
Robert Speicher
80a6d2fda2 Use :empty_project where possible throughout spec/lib 2017-01-25 12:25:42 -05:00
Lin Jen-Shin
d15b7db121 Fix References header parser for Microsoft Exchange
Microsoft Exchange would append a comma and another
message id into the References header, therefore we'll
need to fallback and parse the header by ourselves.

Closes #26567
2017-01-20 20:19:22 +08: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
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
f393f2dde0
Simplify the slash commands DSL to store action blocks instead of creating methods
Other improvements:
- Ensure slash commands autocomplete doesn't break when noteable_type is not given
- Slash commands: improve autocomplete behavior and /due command
- We don't display slash commands for note edit forms.
- Add tests for reply by email with slash commands
- Be sure to execute slash commands after the note creation in Notes::CreateService

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:36:47 +02:00
Rémy Coutable
39f7f63fe9 Add the /title slash command
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:06:12 +02: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
8c0b619d40 Split tests into their own classes 2016-05-24 17:30:36 +08:00