Commit Graph

38 Commits

Author SHA1 Message Date
GitLab Bot f1ce233e6a Add latest changes from gitlab-org/gitlab@master 2023-12-08 15:12:48 +00:00
GitLab Bot fb28ad5316 Add latest changes from gitlab-org/gitlab@master 2023-11-29 12:14:14 +00:00
GitLab Bot 0c6f357040 Add latest changes from gitlab-org/gitlab@master 2023-08-22 18:07:27 +00:00
GitLab Bot 27a5080c34 Add latest changes from gitlab-org/gitlab@master 2023-05-03 15:12:58 +00:00
GitLab Bot af833d9730 Add latest changes from gitlab-org/gitlab@master 2022-12-02 18:07:23 +00:00
GitLab Bot 61666f277a Add latest changes from gitlab-org/gitlab@master 2022-12-01 21:08:18 +00:00
GitLab Bot fd1c75caeb Add latest changes from gitlab-org/gitlab@master 2022-08-02 03:09:33 +00:00
GitLab Bot 669ad9e431 Add latest changes from gitlab-org/gitlab@master 2022-05-06 12:09:05 +00:00
GitLab Bot 4a17cae545 Add latest changes from gitlab-org/gitlab@master 2022-02-08 09:12:17 +00:00
GitLab Bot ed01bf9b25 Add latest changes from gitlab-org/gitlab@master 2021-08-13 03:10:09 +00:00
GitLab Bot a0dd45d8c8 Add latest changes from gitlab-org/gitlab@master 2021-04-16 03:09:00 +00:00
GitLab Bot eb29a43da9 Add latest changes from gitlab-org/gitlab@master 2021-01-05 03:10:19 +00:00
GitLab Bot dc86d5615e Add latest changes from gitlab-org/gitlab@master 2020-09-18 12:09:50 +00:00
GitLab Bot 40024efc70 Add latest changes from gitlab-org/gitlab@master 2020-09-03 12:08:47 +00:00
GitLab Bot 66bd1f0fdc Add latest changes from gitlab-org/gitlab@master 2020-07-14 15:09:05 +00:00
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
GitLab Bot 808c799a67 Add latest changes from gitlab-org/gitlab@master 2020-05-22 12:08:15 +00:00
GitLab Bot 02ab65d49f Add latest changes from gitlab-org/gitlab@master 2020-01-14 09:08:19 +00:00
Heinrich Lee Yu a04d9ba90c Add reply to notes to turn into discussions 2019-02-06 10:31:46 +00:00
Heinrich Lee Yu 35b8f103a8
Prevent comments by email when issue is locked
This changes the permission check so it uses the policy on Noteable
instead of Project. This prevents bypassing of rules defined in
Noteable for locked discussions and confidential issues.

Also rechecks permissions when reply_to_discussion_id is provided since the
discussion_id may be from a different noteable.
2019-01-31 16:52:48 +01:00
Sean McGivern 55465747aa Add frozen_string_literal: true to email handlers 2018-09-03 10:33:48 +01:00
Mario de la Ossa 02741ca4c5
Backport 5480-epic-notifications from EE 2018-05-07 12:58:47 -06:00
Sean McGivern daeeb7f848 Fix quick actions for users who cannot update issues and MRs
There are several quick actions now that don't need this access - /todo and
/unsubscribe for instance - but when these were first added, there
weren't. Quick actions are now responsible for checking their own permissions.
2018-03-02 16:16:13 +00:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11: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
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
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 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