Commit graph

26 commits

Author SHA1 Message Date
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
Achilleas Pipinellis
85940d766a
Default to HTTPS for all Gravatar URLs
If using gravatar.com, both plain_url and ssl_url in settings are now
served via HTTPS. Make this the default.
2018-01-25 10:00:46 +01:00
Jan Provaznik
b39b5524f2 Use message body for merge request description
When a merge request is created from email, use message body
as merge request description. If message body is empty then
merge request description is still created from the source
branch commit (if there is only single commit in the merge
request).

If message body is empty and there are multiple commits in
the source branch, then merge request description is left empty.

Closes #40968
2017-12-11 11:46:21 +01:00
Jan Provaznik
8cce70730c Create merge request from email
* new merge request can be created by sending an email to the specific
email address (similar to creating issues by email)
* for the first iteration, source branch must be specified in the mail
subject, other merge request parameters can not be set yet
* user should enable "Receive notifications about your own activity" in
user settings to receive a notification about created merge request

Part of #32878
2017-12-05 08:41:58 +01:00
Dimitrie Hoekstra
82c002ebce Changed all font-weight values to 400 and 600 2017-08-24 14:13:24 +00:00
http://jneen.net/
d866c7763c add a spec for no-href link parsing 2017-06-19 14:24:19 -07:00
Sean McGivern
eb490365b5 Handle incoming emails from aliases correctly
These set the 'actual' destination email in one of the Delivered-To lines, so
check those too.
2017-05-03 20:51:10 +01: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
http://jneen.net/
f7b0692912 add parsing support for incoming html email 2016-11-17 11:59:44 +09: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
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
65349c2212 Make slash commands contextual
- Return only slash commands that make sense for the current noteable
- Allow slash commands decription to be dynamic

Other improvements:

- Add permission checks in slash commands definition
- Use IssuesFinder and MergeRequestsFinder
- Use next if instead of a unless block, and use splat operator instead of flatten

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
9436a444f3 Rename reply_key to mail_key 2016-05-20 13:05:57 -05:00
Lin Jen-Shin
a065c8d5d8 Create a new issue via: incoming+group/project+AUTH_TOKEN@... 2016-05-16 21:27:16 +00:00
Lin Jen-Shin
347ee6cc91 Alloy empty reply for new issues, but not response 2016-05-16 21:27:16 +00:00
Lin Jen-Shin
6cfd028278 Implement #3243 New Issue by email
So we extend Gitlab::Email::Receiver for this new behaviour,
however we might want to split it into another class for better
testing it.

Another issue is that, currently it's using this to parse project
identifier:

    Gitlab::IncomingEmail.key_from_address

Which is using:

    Gitlab.config.incoming_email.address

for the receiver name. This is probably `reply` because it's used
for replying to a specific issue. We might want to introduce another
config for this, or just use `reply` instead of `incoming`.

I'll prefer to introduce a new config for this, or just change
`reply` to `incoming` because it would make sense for replying to
there, too.

The email template used in tests were copied and modified from:
`emails/valid_reply.eml` which I hope is ok.
2016-05-16 21:27:16 +00:00
Rémy Coutable
9f218fc184 Improve and finish the fallback to the In-Reply-To and References header for the reply-by-email feature
A few things to note:
- The IncomingEmail feature is now enabled even without a
  correctly-formatted sub-address
- Message-ID for new thread mail are kept the same so that subsequent
  notifications to this thread are grouped in the thread by the email
  service that receives the notification
  (i.e. In-Reply-To of the answer == Message-ID of the first thread message)
- To maximize our chance to be able to retrieve the reply key, we look
  for it in the In-Reply-To header and the References header
- The pattern for the fallback reply message id is "reply-[key]@[gitlab_host]"
- Improve docs thanks to Axil
2016-03-25 13:05:15 +01:00
David Padilla
31e76baf61 Fix #2364. Fall back to In-Reply-To header when reply key not available 2016-03-25 13:05:15 +01:00
Douwe Maan
15fc7bd613 No HTML-only email please 2015-08-21 16:09:55 -07:00
Douwe Maan
6110e175dc Use heredocs. 2015-08-20 13:10:55 -07:00
Douwe Maan
e1eb09dd0e Remove more unused fixtures. 2015-08-20 12:33:33 -07:00
Douwe Maan
2b5a2b8f39 Removed unused fixtures. 2015-08-20 12:29:03 -07:00
Douwe Maan
e44936f3ed Test EmailReceiverWorker. 2015-08-20 11:47:09 -07:00
Douwe Maan
83081f1673 Start on tests. 2015-08-19 18:00:13 -07:00