Commit Graph
5655 Commits
Author SHA1 Message Date
Felipe Artur dc2ca59433 Expose notification setting events in API 2016-06-13 15:51:11 -03:00
Felipe Artur e60999ec5c Improve notification settings event keys and add some specs 2016-06-13 15:51:11 -03:00
Douwe Maan 1cbd5c6686 Merge branch 'gitlab-auth-method-names' into 'master'
Improve Gitlab::Auth method names

Auth.find was a very generic name for a very specific method.
Auth.find_in_gitlab_or_ldap was inaccurate in GitLab EE where it also
looks in Kerberos.


See merge request !4589
2016-06-13 18:05:53 +00:00
Jacob Schatz 70672182d1 Merge branch 'fix-bulk-assign-labels' into 'master'
Fixes bulk-assign label for multiple issues not having the same labels

## What does this MR do?
Fixes a bug when bulk-assigning a label to multiple issues while the label is present in on the issues on the selection.

## Screenshots (if relevant)

**Before Bugfix**

<img src="/uploads/ad1f290bcf3930177a3a71c69cbe5325/before-bugfix.gif" width="700"/>

**After Bugfix**

<img src="/uploads/1f04d6bf027806fb13ca3773febda744/bugfix.gif" width="700"/>

## Does this MR meet the acceptance criteria?

- [x] Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)

See merge request !4602
2016-06-13 15:57:38 +00:00
Kamil Trzcinski 0fab7b11ba Merge remote-tracking branch 'origin/master' into artifacts-when 2016-06-13 16:05:43 +02:00
Jacob Vosmaer f73cf3e937 Also rename "find" in the specs 2016-06-13 15:38:25 +02:00
Rémy Coutable c0e415e488 Merge branch 'fix-migration-helper-race-conditions' into 'master'
Fix migration helper race conditions

## What does this MR do?

This MR fixes two problems with the migration helpers:

1. An error in `change_column_null` would not drop the previously created column
2. `update_column_in_batches` would rely on the number of rows in a table to determine how many to update. This meant that newly inserted rows (after the `COUNT`) would not be taken into account.

This MR also removes an outdated comment for `update_column_in_batches`.

## Are there points in the code the reviewer needs to double check?

No.

## Why was this MR needed?

See above.

## What are the relevant issue numbers?

Fixes #18483

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] ~~API support added~~
- [ ] Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4618
2016-06-13 12:50:39 +00:00
Rémy Coutable dc38551b93 Merge branch '18377-cherry-pick-crashes-when-choosing-a-tag' into 'master'
Only show branches for revert / cherry-pick

## What does this MR do?

Stop showing tags in the revert and cherry-pick select options. You can't change a tag anyway.

## Are there points in the code the reviewer needs to double check?

Uncertain.

## Why was this MR needed?

Showing tags doesn't make any sense and will just throw an exception if the user tries to cherry-pick or revert onto a tag.

## What are the relevant issue numbers?

Fixes #18377.

## Screenshots (if relevant)

On the GitLab CE repo:

![image](/uploads/9c5a6f09300a7c46d0a794bef2956992/image.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- [ ] Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4596
2016-06-13 12:46:29 +00:00
Douwe Maan c03f125904 Merge branch 'issue_3359_2' into 'master'
Remove notification level from user model

part of #3359 

See merge request !4494
2016-06-13 11:52:39 +00:00
Kamil Trzcinski bb3fc8c72c Make "four phase test" 2016-06-13 12:07:03 +02:00
Sean McGivern b997752539 Only show branches for revert / cherry-pick
Tags are immutable, so we can't add a commit to either revert or
cherry-pick another commit to them.
2016-06-13 11:05:22 +01:00
Yorick Peterse b33b7be53e Handle NULL migration errors in migration helpers
This ensures that whenever changing the NULL constraint of a column
fails we still drop the column.
2016-06-13 11:22:58 +02:00
Gabriel MazettoandRobert Speicher 7c87dac5f1 Improved SVG sanitizer specs to include smoke tests for clean. 2016-06-12 21:05:58 -04:00
Gabriel MazettoandRobert Speicher a9eaa20dcb Refactored SVG sanitizer 2016-06-12 21:05:58 -04:00
Gabriel MazettoandRobert Speicher 13791c6704 Refactor SVG sanitizer and prevent xlink:href to refer to external resources 2016-06-12 21:05:58 -04:00
Gabriel MazettoandRobert Speicher 02b882418a Fix SVG whitelisting to allow namespaced attributes 2016-06-12 21:05:57 -04:00
Robert Speicher 8d243f9bda Merge branch 'fix-closes-issues-error-500' into 'master'
Fix Error 500 when using closes_issues API with an external issue tracker

Closes #18484

See merge request !4608
2016-06-12 19:26:29 +00:00
Stan Hu a85dde9182 Fix Error 500 when using closes_issues API with an external issue tracker
Closes #18484
2016-06-11 19:50:08 -07:00
Dmitriy Zaporozhets f3cbd4bbb6 Merge branch '18417-nav-offscreen' into 'master'
Resolve "Hide Left sidebar paradigm"

## What does this MR do?
Hides the nav bar by default & centers the tanuki logo in the top nav

## Why was this MR needed?
UX

## What are the relevant issue numbers?
Closes #18417 

## Screenshots (if relevant)
![Screen_Shot_2016-06-10_at_12.49.10_PM](/uploads/c281e4c9de1c1bc9af59ebfa8d2bd18b/Screen_Shot_2016-06-10_at_12.49.10_PM.png)
![Screen_Shot_2016-06-10_at_12.49.27_PM](/uploads/635e0a88230105faa5527f6632899ddb/Screen_Shot_2016-06-10_at_12.49.27_PM.png)
<img src="/uploads/3001a9c723037012f1b86cfacfb1225e/Screen_Shot_2016-06-10_at_12.51.41_PM.png" width="500px">

See merge request !4579
2016-06-11 08:43:21 +00:00
Alfredo Sumaran 952660d2cf Fixes a bug when assigning a label to multiple issues
Fixes the case when we want to assign a label to multiple issues and one of the issues has already the label we want to apply.
2016-06-10 23:55:50 -05:00
Annabel Dunstone 3e28d04cce Fix preferences_spec test 2016-06-10 15:08:13 -05:00
Kamil Trzcinski 3714e1914b Improve after review 2016-06-10 21:25:48 +02:00
Robert Speicher b4e84809e8 Merge branch 'finding-multiple-projects-by-paths' into 'master'
Add Project.where_paths_in

In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4410 I'm working on reducing the SQL queries needed to render Markdown. One reason for the large amount of queries is executing a large number of queries needed to find projects and related data. Basically `Project.find_with_namespace` is called in a loop and then any relations have to be retrieved separately.

By using `Project.where_paths_in` we can work around this by doing something like:

```ruby
project_paths = [...] # populated by some method
projects = Project.where_paths_in(project_paths).includes(:namespace, ...)
```

Ref: https://gitlab.com/gitlab-org/gitlab-ce/issues/18042

See merge request !4535
2016-06-10 17:17:19 +00:00
Robert Speicher 37be2007f9 Merge branch 'workhorse-helpers' into 'master'
Add workhorse controller and API helpers

Adds `send_git_blob` and `send_git_archive` controller and API helpers to reduce duplication and make Workhorse easier for a developer to work with.

See merge request !4486
2016-06-10 16:21:26 +00:00
Jacob Schatz d6de816982 Merge branch 'ci-page-ui-update' into 'master'
CI build page UI update

Closes #2569 

See merge request !3829
2016-06-10 15:44:21 +00:00
Jacob Schatz e99559260b Merge branch 'user-search-dropdown' into 'master'
Revert change to search all users

## What does this MR do?

Reverts a change that allowed the user to search for all users in the author/assignee dropdown

## Are there points in the code the reviewer needs to double check?

Double check it isn't still searching all users

See merge request !4564
2016-06-10 15:30:28 +00:00
Jacob Schatz 7aa6768812 Merge branch 'label-filter-fix' into 'master'
Fixed issue where label filtering didnt work

## What does this MR do?

The filterable option was missing which meant labels in the dropdown couldn't be filtered. This fixes that.

## What are the relevant issue numbers?

Closes #18375 

See merge request !4556
2016-06-10 15:23:39 +00:00
Felipe Artur 39ead205de Remove notification level fild from users, improve migrations and specs 2016-06-10 11:49:30 -03:00
Rémy Coutable 133d5c1c64 Merge branch 'rename-ci-commit-phase-4' into 'master'
Rename Commit to Pipeline in TriggerRequest

Changes in TriggerRequest a `commit` to `pipeline`.


See merge request !4505
2016-06-10 14:31:21 +00:00
Felipe Artur 8f6d43e0fe Remove notification level from user model 2016-06-10 10:58:13 -03:00
Paco GuzmanandYorick Peterse be98ee2586 Fixing specs stubbed objects cannot access database 2016-06-10 15:41:56 +02:00
Paco GuzmanandYorick Peterse 136a4ea39b Cache the presence of an issue_tracker at project level
Using update_column to store the boolean flag to avoid
any side effects with the current state of the project
instance
2016-06-10 15:41:56 +02:00
Yorick Peterse 24920bc52a Add Project.where_paths_in
This method can be used to find multiple projects for multiple paths.
For example, take this snippet:

    Project.where_paths_in(%w{gitlab-org/gitlab-ce gitlab-org/gitlab-ee})

This will return an ActiveRecord::Relation containing the GitLab CE and
GitLab EE projects.

This method takes care of matching rows both case-sensitively and
case-insensitively where needed.

Project.find_with_namespace in turn has been modified to use
Project.where_paths_in without nuking any scoping (instead it uses
reorder(nil)). This means that any default scopes (e.g. those used for
"pending_delete" stay intact).

The method Project.where_paths_in was added so the various Markdown
filters can use a single query to grab all the projects referenced in a
set of documents, something Project.find_with_namespace didn't allow.
2016-06-10 15:33:05 +02:00
Phil Hughes 998c688699 Updated tests 2016-06-10 14:26:46 +01:00
Jacob Vosmaer 0e896ffe4e Improve Gitlab::Auth method names
Auth.find was a very generic name for a very specific method.
Auth.find_in_gitlab_or_ldap was inaccurate in GitLab EE where it also
looks in Kerberos.
2016-06-10 14:51:16 +02:00
Rémy Coutable 3579edba1f Rename ci_commit -> pipeline
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-10 14:41:38 +02:00
Rémy Coutable 5324c93643 Rename MergeRequest#cannot_be_merged_because_build_is_not_success? to #mergeable_ci_state?
The logic of the method was obviously inverted.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-10 14:37:32 +02:00
Rémy Coutable 6dff7c1771 Improve initial implementation of the 'only_allow_merge_if_build_succeeds.rb' feature
Based on the feedback from reviewers.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-10 14:36:57 +02:00
Rui AndersonandRémy Coutable 07dbd6b388 Allow or not merge MR with failed build
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-10 14:36:54 +02:00
Kamil Trzcinski 9ba0f83d25 Merge remote-tracking branch 'origin/master' into rename-ci-commit-phase-4 2016-06-10 13:58:35 +02:00
Phil Hughes a6345c1401 Fixed failing tests 2016-06-10 12:07:51 +01:00
Phil Hughes dc6ec2adf8 CI build page UI update
Added sidebar
Removed elements not present in design
2016-06-10 12:07:51 +01:00
Douwe Maan 16bd4e5668 Merge branch 'master' into workhorse-helpers 2016-06-10 12:28:04 +02:00
Phil Hughes a4b3bdabd5 removed tests needed for any author 💩 2016-06-10 10:45:44 +01:00
Timothy Andrew 99d5a91d7a Fix failing EmailOnPush spec. 2016-06-10 14:11:02 +05:30
Jacob Schatz cea3cf177c Merge branch 'award-emoji-fixes' into 'master'
Award emoji fixes

Fixes #18357 #18325 and #18424

See merge request !4550
2016-06-09 23:21:50 +00:00
Jacob Schatz 600078cccf Merge branch 'due-date-field-ux-improv' into 'master'
Improved the UX of issue & milestone date picker

## What does this MR do?

Improves the UX of the date picker on issue form & milestone form.

## What are the relevant issue numbers?

Closes #18198 

## Screenshots (if relevant)

### Issues

![Screen_Shot_2016-06-06_at_09.28.29](/uploads/d9c192dff0d8076adc3ed6f005ea3790/Screen_Shot_2016-06-06_at_09.28.29.png)

### Project milestones

![Screen_Shot_2016-06-06_at_09.28.18](/uploads/2d03d72791c5fc6badfadb975a85af2b/Screen_Shot_2016-06-06_at_09.28.18.png)

### Group milestones

![Screen_Shot_2016-06-06_at_09.28.05](/uploads/0f28532396a16e6fd48ddea784ca28e3/Screen_Shot_2016-06-06_at_09.28.05.png)

See merge request !4485
2016-06-09 20:54:05 +00:00
Jacob Schatz 2cb4cb2ee3 Merge branch 'issue_17607' into 'master'
Fix local timeago on user dashboard

## What does this MR do?
Fixes incorrect date times on tooltips on the dashboard page

## Are there points in the code the reviewer needs to double check?
Yes,  The tooltip has to be recreated again because we needed a custom CSS classname in order to fix the date being splitted into two lines.

## Why was this MR needed?
Because the datetimes were incorrect we have to have the same format for .timeago() instances.

## What are the relevant issue numbers?
#17607

## Screenshots (if relevant)

**Before**

<img src="/uploads/f40cd58e8086d9675262e98a1fe57885/Screen_Shot_2016-05-24_at_7.23.25_PM.png" width="705">

**After**

<img src="/uploads/bd48046ef11659cc742f827b3404fbcd/Screen_Shot_2016-05-24_at_7.22.29_PM.png" width="704">


See merge request !4285
2016-06-09 20:39:29 +00:00
Phil HughesandJacob Schatz 7c88141b95 Fixed tests 2016-06-09 16:24:40 -04:00
Fatih Acet c987837336 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into award-emoji-fixes 2016-06-09 23:07:39 +03:00