Fixed duplicated issue note email notifications.
Fixes#2560
See issue for the details.
Without `uniq` modified tests were failing with:
```
Failure/Error: notification.new_note(note)
(Notify (class)).note_issue_email(21, 1)
expected: 1 time with arguments: (21, 1)
received: 2 times with arguments: (21, 1)
# /home/bak1an/.rvm/gems/ruby-2.1.6@gitlab/gems/sidekiq-3.3.0/lib/sidekiq/extensions/action_mailer.rb:17:in `public_send'
# /home/bak1an/.rvm/gems/ruby-2.1.6@gitlab/gems/sidekiq-3.3.0/lib/sidekiq/extensions/action_mailer.rb:17:in `perform'
# /home/bak1an/.rvm/gems/ruby-2.1.6@gitlab/gems/sidekiq-3.3.0/lib/sidekiq/testing.rb:74:in `block in raw_push'
# /home/bak1an/.rvm/gems/ruby-2.1.6@gitlab/gems/sidekiq-3.3.0/lib/sidekiq/testing.rb:69:in `each'
# /home/bak1an/.rvm/gems/ruby-2.1.6@gitlab/gems/sidekiq-3.3.0/lib/sidekiq/testing.rb:69:in `raw_push'
# /home/bak1an/.rvm/gems/ruby-2.1.6@gitlab/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:68:in `push'
# /home/bak1an/.rvm/gems/ruby-2.1.6@gitlab/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:85:in `client_push'
# /home/bak1an/.rvm/gems/ruby-2.1.6@gitlab/gems/sidekiq-3.3.0/lib/sidekiq/extensions/generic_proxy.rb:19:in `method_missing'
# ./app/services/notification_service.rb:144:in `block in new_note'
# ./app/services/notification_service.rb:143:in `each'
# ./app/services/notification_service.rb:143:in `new_note'
# ./spec/services/notification_service_spec.rb:63:in `block (5 levels) in <top (required)>'
```
I have also added `once` to all `should_email` checks within `notification_service_spec.rb` since it's probably the correct behavior to notify users only once on the same event. Nothing else failed out of the box but we can keep these assertions for future.
See merge request !1925
Ensure "Remove Source Branch" button is not shown when branch is being deleted.
Given the merging of the Merge Request happens in the background, sometimes when the client JS code reloads the page the source branch is not still gone.
This fix appends a new query string parameter that is checked in the view before rendering the `Remove Source Branch` button.
Closes#3583
See merge request !1897
Fix application settings cache not expiring after changes
cache_key is an instance method that relies on updated_at. When changes
were made, the time-dependent key was being used instead of X.application_setting.last.
Closes#3609
See merge request !1972
cache_key is an instance method that relies on updated_at. When changes
were made, the time-dependent key was being used instead of X.application_setting.last.
Closes#3609
* add note to Events API
* add author section to Events API
* add noteable_id and noteable_type to Notes API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
UI: Improve form consistency
Depends on !1953
See the commits for more details, the messages mostly speak for themselves.
# Highlights
## Tag form
Before:

After:

See merge request !1955
Add authorization to new branch/tag pages.
The create actions have authorization, the new actions didn't,
so no-one unauthorized could actually do anything, but it was wrong(TM).
See merge request !1979
Fixed invalid link on starred projects dashboard.
Fixes#3468
The MR fixes 'Project' links on a dashboard pages headers. See the issue for the details.
This MR does not include tests since the change is rather trivial and there are no (as far as I have seen) existing tests for checking links validity.
In case tests are required I would like to get some guidance on the implementation first. At least I would like to know what should be covered: changed links, all header links, all navigation?
See merge request !1926
UI: Use new style for wiki
Depends on !1953
See the commits for more details, the messages mostly speak for themselves.
# Highlights
## Wiki Page
Before:

After:

## Edit Wiki Page
Before:

After:

See merge request !1967
UI: New Project form tweaks
Depends on !1953
See the commits for more details, the messages mostly speak for themselves.
Before:

After:

See merge request !1964
UI: Issuable filter tweaks
Depends on !1953
See the commits for more details, the messages mostly speak for themselves.
# Highlights
## Filter bar
Before:

After:

## Bulk edit bar
Before:

After:

See merge request !1963
Touch project when toggling stars to update cache
This is a fix for gitlab-org/gitlab-ce#3513.
When a star toggle event happens, we touch project to clear cache key.
This will trigger a new "updated_at" at the project model. If it's undesirable, please let me know and I will try to solve it in a different way.
See merge request !1970
UI: Issuable list item tweaks
Depends on !1953
See the commits for more details, the messages mostly speak for themselves.
Before:

After:

Fixes https://dev.gitlab.org/gitlab/gitlabhq/issues/2590 and https://dev.gitlab.org/gitlab/gitlabhq/issues/2589
See merge request !1962
UI: Use new style for milestone detail page
Depends on !1953
See the commits for more details, the messages mostly speak for themselves.
Before:

After:

See merge request !1966
UI: Project home panel tweaks
Depends on !1953
See the commits for more details, the messages mostly speak for themselves.
Before:

After:

See merge request !1965