Commit Graph
27966 Commits
Author SHA1 Message Date
Robert Speicher 56c8125ee1 Merge branch 'improve-destroy-logging' into 'master'
Improve log message when a project is destroyed to include the namespace

See merge request !4114
2016-05-11 13:21:26 +00:00
Robert Speicher 24f353edc4 Merge branch '17249-starred' into 'master'
Restrict starred projects to viewable ones

`User#starred_projects` doesn't perform any visibility checks. This has
a couple of problems:

1. It assumes a user can always view all of their starred projects in
   perpetuity (project not changed to private, access revoked, etc.).
2. It assumes that we'll only ever allow a user to star a project they
   can view. This is currently the case, but bugs happen.

Add `User#viewable_starred_projects` to filter the starred projects by
those the user either has explicit access to, or are public or
internal. Then use that in all places where we list the user's starred
projects.

Closes #17249.

See merge request !4108
2016-05-11 12:49:29 +00:00
Robert Speicher d526cda502 Merge branch '17270-only-generate-email-on-push-once-for-all-recipients' into 'master'
Only generate repository push email once

The repository push email can be very expensive to generate, especially
with syntax-highlighted diffs. Instead of generating the email for each
recipient, generate one email object and reset the Message-Id and To
headers for each recipient. (Cloning would also be expensive in the case
of large emails, although probably not as bad as generating from
scratch.)

Closes #17270.

See merge request !4070
2016-05-11 12:45:39 +00:00
Yorick Peterse e9706b2f9b Merge branch 'update-changelog-874' into 'master'
Updated 8.7.4 CHANGELOG entries

See merge request !4116
2016-05-11 12:21:06 +00:00
Yorick Peterse c446a86510 Updated 8.7.4 CHANGELOG entries
[ci skip]
2016-05-11 14:19:30 +02:00
Rémy Coutable e77a9a342e Merge branch 'casecmp-cop' into 'master'
Enable Rubocop Casecmp Performance Cop.

Also fixes the errors caused by enabling the cop.

`casecmp` is more performant than `.downcase` and `==`.

See also: https://github.com/bbatsov/rubocop/blob/master/lib/rubocop/cop/performance/casecmp.rb

See merge request !3957
2016-05-11 08:59:44 +00:00
Rémy Coutable de5ae1bf06 Merge branch 'string-replacement-cop' into 'master'
Enable the StringReplacement cop.

Also fix one use of `gsub` that would be faster as `delete`.

Use `tr` instead of `gsub` when you are replacing the same number of characters. Use `delete` instead of `gsub` when you are deleting characters.

See merge request !3960
2016-05-11 08:58:59 +00:00
Sean McGivern 5f27e26bb4 Only generate repository push email once
The repository push email can be very expensive to generate, especially
with syntax-highlighted diffs. Instead of generating the email for each
recipient, generate one email object and reset the Message-Id and To
headers for each recipient. (Cloning would also be expensive in the case
of large emails, although probably not as bad as generating from
scratch.)
2016-05-11 09:16:01 +01:00
Sean McGivern acd8930c46 Tidy up user project specs 2016-05-11 09:03:23 +01:00
Stan Hu f2548f3f2b Improve log message when a project is destroyed to include the namespace 2016-05-10 22:07:13 -07:00
Jacob Schatz c24cd968f3 Merge branch 'jquery-scrollto' into 'master'
Removes jquery-scrollto-rails.

Instead the script is now included directly from the vendor directory.

Resolves #17166. Working towards #14286 and merging !3775.

The gem was on 1.4.3.1, here's the diff between that tag and 2.1.2 (the version I'm using in this MR): https://github.com/flesler/jquery.scrollTo/compare/1.4.3...2.1.2

There aren't any notable breaking changes that I noticed, and I didn't see any JS errors after testing a bunch of pages.

cc: @jschatz1 

See merge request !4088
2016-05-11 02:53:58 +00:00
Connor Shea 4995302df6 Enable the StringReplacement cop.
Also fix one use of `gsub` that would be faster as `delete`.

Use `tr` instead of `gsub` when you are replacing the same number of
characters. Use `delete` instead of `gsub` when you are deleting
characters.
2016-05-10 18:34:15 -06:00
Connor Shea 976a70522f Removes jquery-scrollto-rails.
Instead the script is now included directly from the vendor directory.

Resolves #17166.
2016-05-10 18:31:36 -06:00
Connor Shea 377583a361 Enable Rubocop Casecmp Performance Cop.
Also fixes the errors caused by enabling the cop. casecmp is more performant than `.downcase` and `==`.
2016-05-10 18:23:25 -06:00
Jacob Schatz f7d2297c86 Merge branch 'fix-r-shortcut' into 'master'
Restore "r" shortcut

Fixes "Reply with Selected Text" shortcut

See merge request !4041
2016-05-10 21:10:46 +00:00
Robert Speicher 971662e6a4 Merge branch 'stanhu/gitlab-ce-add-eager-load-lib' into 'master'
Add eager load paths to help prevent dependency load issues with Sidekiq workers

_Originally opened at !3545 by @stanhu._

- - -

Relevant resources:

- https://github.com/mperham/sidekiq/wiki/FAQ#why-doesnt-sidekiq-autoload-my-rails-application-code
- https://github.com/mperham/sidekiq/issues/1281#issuecomment-27129904
- http://blog.arkency.com/2014/11/dont-forget-about-eager-load-when-extending-autoload
- https://github.com/rails/rails/blob/52ce6ece8c8f74064bb64e0a0b1ddd83092718e1/railties/lib/rails/engine.rb#L472-L479
- https://github.com/rails/rails/blob/v4.2.6/railties/lib/rails/paths.rb

Attempts to address #3661, #11896, #12769, #13521, #14131, #14589, #14759, #14825.

See merge request !3724
2016-05-10 20:14:40 +00:00
Stan Hu 634f02b095 Merge branch 'issue_13987' into 'master'
Update Ace Editor

Upgrading fixes scroll navigation on mobile.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/13987

![scroll](/uploads/fd655fa6033ddc0337080c89c3fbf92f/scroll.gif)

See merge request !3823
2016-05-10 20:13:52 +00:00
Robert Speicher 7d4f4ad4b0 Merge branch '15529-fix=missing-from-clause-for-table-issues' into 'master'
Fix an issue when filtering merge requests with more than one label

Fixes #15529.

See merge request !3886
2016-05-10 19:20:27 +00:00
Alfredo Sumaran 77f1b9dcd4 Update CHANGELOG 2016-05-10 14:06:41 -05:00
Alfredo Sumaran 53568da9ed Update Ace Editor 2016-05-10 13:59:05 -05:00
Jacob Schatz e3911a1896 Merge branch 'issue_15673' into 'master'
Add to label ID to response

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/15673

See merge request !4023
2016-05-10 18:10:20 +00:00
Sean McGivern 97424ea544 Restrict starred projects to viewable ones
`User#starred_projects` doesn't perform any visibility checks. This has
a couple of problems:

1. It assumes a user can always view all of their starred projects in
   perpetuity (project not changed to private, access revoked, etc.).
2. It assumes that we'll only ever allow a user to star a project they
   can view. This is currently the case, but bugs happen.

Add `User#viewable_starred_projects` to filter the starred projects by
those the user either has explicit access to, or are public or
internal. Then use that in all places where we list the user's starred
projects.
2016-05-10 18:13:52 +01:00
Robert Speicher 48c80fdf43 Merge branch 'fix/remove-broken-inline-runner-desc-edit' into 'master'
Remove broken inline runner description edit form

This remove inline form for editing runnner's description.

It is broken because of missing partial / incorrect response and it also does not make much sense, since we have under 'Edit' button a form that makes it possible to edit more than just a description.

See merge request !4095
2016-05-10 17:10:07 +00:00
Rémy Coutable a278b36ab0 Fix an issue when filtering merge requests with more than one label
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-10 19:07:46 +02:00
Robert Speicher 0cc8cee6cd Merge branch 'fix/using-uploads-in-global-snippets' into 'master'
Fix using link to uploads in global snippets

Closes #17342, closes #17363

See merge request !4085
2016-05-10 17:07:10 +00:00
Grzegorz Bizon 535be93a77 Do not process upload links if no project context 2016-05-10 13:50:56 +02:00
Grzegorz Bizon c97a81d274 Add Changelog entry for upload link in snippet fix 2016-05-10 13:46:31 +02:00
Grzegorz Bizon 4c506c4498 Fix using link to uploads in global snippets
Closes #17342, closes #17363
2016-05-10 13:46:31 +02:00
Dmitriy Zaporozhets 98d8e3fe9f Change dashboard button color to white on hover
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-05-10 13:24:53 +02:00
Dmitriy Zaporozhets 0f1cf1d87b Minor consistency fixes to sidebar & header
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-05-10 13:16:09 +02:00
Grzegorz Bizon bbc94e15a3 Use abbrevation in runners table in admin area 2016-05-10 13:07:14 +02:00
Dmitriy Zaporozhets 0c4fb72b06 Merge branch 'mobile-navigation-redesign' into 'master'
Hide navbar on mobile

Part of  #14838    
Closes #17323    

<img src="/uploads/33d2dbc17e94329891108c4e80d4aff3/nav.gif" width="800px">

See merge request !4103
2016-05-10 10:57:12 +00:00
Dmitriy Zaporozhets 21f942a5ad Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2016-05-10 12:51:24 +02:00
Rémy Coutable 4453104d75 Merge branch '2460-3690-support-multiline-tag-message' into 'master'
Support multi-line tag messages

_Originally opened at !2853 by @clns._

- - -

Tag messages in Git can include a short summary of what changes are included in a release and any other relevant information. So I think GitLab should support multi-line tag messages, both in the "New Tag" interface and when viewing the tag.

Also a non-technical user could use GitLab's interface to create releases, but at the moment this is impossible because he cannot enter a multi-line message. This would've been very handy, otherwise he would need to do it from the command line or other GUI program, which is not something a non-technical user has access to or knows how to do.

This merge request adds support for multi-line tag messages. Below are the impacted screens. Let me know if I should change anything.

This would close #3690 and #2460

![image](/uploads/d33bede1141bfb10c5d9c301ee1cb0ec/image.png)
![image](/uploads/ebfea358c1a5986e7b95ad31748f7a6a/image.png)

See merge request !3833
2016-05-10 10:28:35 +00:00
Rémy Coutable 5589dcf8db Fix a few places where autoloading would fail
- Fix naming of API::CommitStatuses
- Ensure we use require_dependency instead of require
- Ensure the namespace is right in lib/api/api.rb, otherwise, we
  might require Grape::API::Helpers which defines the `#params` method.
  This is to avoid requiring a file multiple times and getting an "Already
  initialized constant" error.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-10 11:51:19 +02:00
Stan HuandRémy Coutable 6da3388569 Add eager load paths to help prevent dependency load issues with Sidekiq workers
Attempts to address #13521, #14825

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-10 11:51:19 +02:00
Rémy Coutable 3af78b5c53 Merge branch 'revert-4026' into 'master'
Revert "Merge branch 'wiki-fix' into 'master'"

This reverts commit 4cc85a58e8 (!4026), reversing
changes made to 90ae445ba9.

From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4026#note_11719950:

>  1. On Ruby 2.1.x, the [`uri.path = ::File.join(project_wiki_base_path, uri.path)`](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/banzai/filter/wiki_link_filter.rb#L39) raises an `URI::InvalidComponentError: bad component(expected relative path component): http://bar.com/baz` error in `Banzai::Filter::WikiLinkFilter#rebuild_wiki_uri`, which is then rescued in [`Banzai::Filter::WikiLinkFilter#process_link_attr`](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/banzai/filter/wiki_link_filter.rb#L34), thus the link is not modified and the tests pass.
1. On Ruby 2.2.x, the same line doesn't raise an error anymore, thus tests are broken on Ruby 2.2 only. I didn't really understand yet why having absolute links in the wiki would break some tests vs having relative links as before, but I think the safest course to action is to revert this MR and to find another fix (probably just prepending `ProjectWiki#wiki_base_path` with the relative URL path component if we are in the case of a relative URL...
/cc @artem-sidorenko

Just a FYI note: no need to pick into `8-7-stable` since the original commit was not picked.

See merge request !4105
2016-05-10 09:47:55 +00:00
Rémy Coutable 1026f2ad09 Add integration specs for tags
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-10 11:45:03 +02:00
Calin SeciuandRémy Coutable f95a8e450c Replace text field with textarea in 'New Tag' view and display tag message in <pre> 2016-05-10 11:45:03 +02:00
Yorick Peterse f96c34ec45 Merge branch 'remove-annotate-gem' into 'master'
Remove the annotate gem and delete old annotations

In 8278b763d9 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.

Fixes: #17382 

/cc @yorickpeterse 

See merge request !4099
2016-05-10 09:08:30 +00:00
Rémy Coutable f52a15e022 Revert "Merge branch 'wiki-fix' into 'master' "
This reverts commit 4cc85a58e8, reversing
changes made to 90ae445ba9.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-10 10:57:48 +02:00
Jeroen van Baarsen 22db5e14f2 Remove the annotate rake task 2016-05-10 07:36:44 +02:00
Annabel Dunstone 36f60982ce Fix media queries for absolutely positioned nav element 2016-05-09 19:34:41 -05:00
Robert Speicher 3dc64764ad Merge branch 'fix-link-to-redmine-issues' into 'master'
Allow Redmine issue references to work as intended

Closes #14527 and #14894 

See merge request !4048
2016-05-10 00:29:17 +00:00
Annabel Dunstone 8eb31c40fc Hide navbar on mobile 2016-05-09 18:53:25 -05:00
Benedikt Huss bf0fd3ea1b Links for redmine issue references are generated correctly again 2016-05-10 00:37:15 +02:00
Robert Speicher e552efe215 Merge branch 'xss-case-insensitive-protocol' into 'master'
Use a case-insensitive check to compare URI schemes

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/17299

See merge request !1965
2016-05-09 22:18:38 +00:00
Achilleas Pipinellis ae25c19ee5 Merge branch 'revert-450ea01d' into 'master'
Revert "Merge branch 'patch-1' into 'master'"

This reverts merge request !4030. /cc @stanhu @axil @aral

See merge request !4097
2016-05-09 19:55:19 +00:00
Stan Hu 849cc380d8 Use a case-insensitive comparison in sanitizing URI schemes
Closes #1625
2016-05-09 12:47:53 -07:00
Douwe Maan 93b4a3a156 Merge branch 'fix/todos-for-private-group-mentions' into 'master'
Fix adding a todo for private group memebers



See merge request !4081
2016-05-09 18:31:41 +00:00