Don't send an email for "mentioned in" notes
Currently, an email is sent every time a mentionable is referenced by an issue, a commit or a merge request: if I comment "This MR is related to #5", the watchers get one email for the comment, and another one stating "Issue #5 was mentioned by issue #13".
This is annoying — but the biggest issue is when pushing an existing branch. Every issue referenced by commit messages in this branch will get a new mention (which is fine), and dozens of emails will be sent for all these new mentions (which is not).
This commit fixes the spam by avoiding to send an email when a new mention is added to an existing mentionable. In most cases the email notification sent by the mentioner is enough.
The 'author_id_of_changes' attribute is not persisted in the database.
As we retrieve the merge request from the DB just before sending the
email, this attribute was always nil.
Also there was no tests for the merge notification code - tests have
been added.
Fix#6605
Removes the following from test output:
DEPRECATION WARNING: It looks like you are eager loading table(s) (one
of: merge_requests, projects) that are referenced in a string SQL
snippet. For example:
Post.includes(:comments).where("comments.title = 'foo'")
Currently, Active Record recognizes the table in the string, and knows
to JOIN the comments table to the query, rather than loading comments in
a separate query. However, doing this without writing a full-blown SQL
parser is inherently flawed. Since we don't want to write an SQL parser,
we are removing this functionality. From now on, you must explicitly
tell Active Record when you are referencing a table from a string:
Post.includes(:comments).where("comments.title =
'foo'").references(:comments)
If you don't rely on implicit join references you can disable the
feature entirely by setting
`config.active_record.disable_implicit_join_references = true`.
The "Merged by" and "Closed by" statements end with an extra space followed by a period. This doesn't seem necessary to me and not having the extra space followed by a period looks better to me. Also, the top of the merge request doesn't have the sentence ending with a period.
Currently this method responds with `text/html`. It is kind of unusable
if you open it in a browser. The browser thinks it is HTML and renders
it as HTML, meaning new lines are dropped. So it's very hard to
distinguish where the key starts and where it ends.
This commit changes the content type header to `text/plain`.
Relative links within one system
When using relative links in md in repository file it will only link within the repository.
When using relative links in md in wiki page, it will only link to wiki pages.