API: Expose Issue#user_notes_count and MergeRequest#user_notes_count
_Originally opened at !2954 by @cnam812._
- - -
Expose `Issue#user_notes_count` and `MergeRequest#user_notes_count` through the API.
See merge request !3126
Don't read otp_secret_encryption_key from hardcoded path in models/user
Variable `Gitlab::Application.config.secret_key_base` is set in config/initializers/secret_token.rb. It's very bad practice to use hard-coded paths inside an application and really unnecessary in this case.
Mirror of https://github.com/gitlabhq/gitlabhq/pull/10311
See merge request !4044
Use the proper GitLab URL for links in Wiki
Fixes gitlab-org/gitlab-ce#17071
wiki links are proper compiled, e.g.
```
[same-level](same-level) -> <a href="same-level">same-level</a>
[sub-level](sub/level) -> <a href="sub/level">sub-level</a>
[upper-level](../upper-level) -> <a href="../upper-level">upper-level</a>
```
See merge request !4026
If you attempt to push thousands of branches at once, the 60-second timeout
will occur because GitAccess checking does a lot of work to check if the
user has permission to push to a branch. This changes does two things:
1. Instead of making 1 DB query per branch push, use a memoized list of protected branches to check
2. Memoize what permissions the user has to perform on this project
On a test of 10,000 branch pushes, this prevents gitlab-shell from hitting the 60-second
timeout.
Closes#17225
Fix build notification on merge request page change even if the build status didn't change
## What does this MR do?
This MR contains a bugfix for #17357 which was introduced by !3998. The notification are now only shown on status changes, and not when switching between different merge requests.
## Are there points in the code the reviewer needs to double check?
Check implementation
## Why was this MR needed?
Because auf a bug introduced in !3998.
## What are the relevant issue numbers?
#17357Closes#17357
See merge request !4086
Update SVG sanitizer to conform to SVG 1.1
Original SVG sanitizer would strip out necessary elements and attributes.
Use a custom Loofah scrubber since sanitize 2.x transformers are inadequate to handle case-sensitive SVG attributes since they parse documents as HTML instead of XML, which causes all SVG attribute names (e.g. `viewBox`) to be downcased.
* SVG element list: https://www.w3.org/TR/SVG/eltindex.html
* SVG attribute list: https://www.w3.org/TR/SVG/attindex.htmlCloses#14555
See merge request !3401
Use a custom Loofah scrubber since sanitize 2.x transformers are inadequate
to handle case-sensitive SVG attributes. sanitize parses documents as HTML
instead of XML, which causes all SVG attribute names (e.g. viewBox) to be downcased.
* SVG element list: https://www.w3.org/TR/SVG/eltindex.html
* SVG attribute list: https://www.w3.org/TR/SVG/attindex.htmlCloses#14555
Add nice new Todo bell



Fixes: #15671
See merge request !4077
Move group settings navigation to own partial
A bit of refactoring for !3980
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
See merge request !4076
Align code within links in comments
Closes#17343
<img src="/uploads/78e03c1dc0e99c7bdb686d9d120a4525/Screen_Shot_2016-05-06_at_9.28.26_AM.png" width="800px">
See merge request !4073
Redesign navigation for group pages
Part of #14838. This MR targets on desktop version. Mobile version improvements will be in separate merge request
See merge request !3980
Auto-set title for branches created from issues
This sets the title for a new MR to 'Resolves "$issue-title"' when:
- The source branch for the MR begins with a value iid.
- The MR has more than one commit in its diff (if there's one commit, keep using the commit's first line).
- The iid does not point to a confidential issue.
Single commit:

Multiple commits:

Confidential issue:

cc @DouweM @zj
Closes#14564
See merge request !3966
Use outer join for issues ordering by milestones due.
This MR contains an implementation for Solution 1 suggested in #14183
Ordering by Milestone due sooner/later ("milestone sort") filters issues without a milestone, which can let users feel like disappearing issues without a milestone.
See merge request !3872
If a branch starts with an issue's IID, followed by a hyphen, the
description will be updated to say that is closes the issue. This also
updates the title of the merge request to 'Resolves "$issue-title"', as
long as:
- There is more than one commit in the merge request (if there is only
one commit, the commit's title will be used as before)
- The issue's IID is valid for the project
Merge request widget displays TeamCity build state and code coverage correctly again
## What does this MR do?
This MR contains a fix for a regression introduced in `8.7`. In former version, the TeamCity build status was always displayed correctly. In `8.7` the build state is still checked, but the UI is not updated correctly any longer.
## Are there points in the code the reviewer needs to double check?
The changes are quite simple, so please simply double check them.
## Why was this MR needed?
This MR is needed to make the TeamCity build status working again.
## What are the relevant issue numbers?
#17080
See merge request !3998
Use `number_to_human_size` helper to show repository size
This will intelligently format large repository sizes in GBs (or,
shudder, TBs).
Also, removes `rescue` clause from `repository_size` helper.
The repository size has since become calculated (and cached)
more intelligently, and this should no longer be necessary.
See merge request !4047