Commit Graph
3219 Commits
Author SHA1 Message Date
Rémy Coutable 8ea6c6d80c Merge branch 'issue_15044' into 'master'
Allow to close invalid merge request

fixes #15044

See merge request !3664
2016-04-13 09:10:57 +00:00
Stan Hu 2ce7559d70 Fix repository cache invalidation issue when project is recreated with an empty repo
To reproduce:

1. Create a project with some content
2. Rename the project
3. Create a new project with the same name.
4. Boom - 404.

After step 2, the branch and tag counts were not being cleared. This would
cause `repository.has_visible_content?` to erroneously return `true`
for the newly-created project.

Closes #13384
2016-04-13 00:04:17 -07:00
Felipe Artur a64f1c7636 Add changelog entry, improve specs and model code 2016-04-12 15:52:03 -03:00
Robert Speicher 66e6052b93 Merge branch 'check-import-job-status' into 'master'
Check and report import job status to help diagnose issues with forking

There are no functional changes, but adding checks/logs for Sidekiq job IDs to help track down why many users seem to get stuck fork/import jobs.

See merge request !3672
2016-04-12 18:07:33 +00:00
Douwe Maan 4516f40dfe Merge branch 'decouple-member-notification' into 'master'
Decouple membership and notifications

This allow you to have notification setting per project even if you are member of group. 
It also creates background for having notification settings in project you are not member of. 


- [x] Make it work
- [x] Migrations
- [x] CHANGELOG
- [x] More tests
- [x] API

For #3359 

After this merge request there is still some work to be done: 

* create migration that remove duplicates in notification settings table and create uniq index (8.8 probably)
* remove notification_level field from Member model in 9.0
* make proper API for notification settings
* use `MemberCreateService` instead of Member#after_create callback for creating notification settings (after #14709) 
* maybe more tests 


Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !3421
2016-04-12 16:39:40 +00:00
Stan Hu c162e0278c Check and report import job status to help diagnose issues with forking 2016-04-11 23:07:06 -07:00
Douglas Barbosa Alexandre 93a10f17e0 Reuse User#notification_settings_for when it's possible 2016-04-11 20:50:26 -03:00
Felipe Artur 476cf23fc3 Allow to close invalid merge request 2016-04-11 19:00:59 -03:00
Jeroen Bobbeldijk f36655dc8b Dont return null 2016-04-11 18:14:01 +02:00
Jeroen Bobbeldijk 27d2b35535 Add changelog, change code to guard clause 2016-04-11 18:11:49 +02:00
Douglas Barbosa Alexandre 73fdd4b83d Use Hash instead of Array on NotificationSetting#level enum 2016-04-11 10:23:40 -03:00
Jeroen Bobbeldijk 08c3936b83 Check head unborn in rugged 2016-04-11 15:10:14 +02:00
Douglas Barbosa Alexandre 635b65d120 Add method to return the user notification setting for a group, or a project 2016-04-08 18:46:45 -03:00
Douglas Barbosa Alexandre ee497599cc Use default_value_for to set default NotificationSetting#level 2016-04-08 17:24:27 -03:00
Douglas Barbosa Alexandre 7afeace354 Merge branch 'master' into decouple-member-notification 2016-04-08 15:48:09 -03:00
Stan Hu 27b9f64efb Expire caches after project creation to ensure a consistent state
Closes #14961
2016-04-07 00:29:01 -07:00
Rémy Coutable e79b867d2b Ensure empty recipients are rejected in BuildsEmailService
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-06 16:14:51 +02:00
Douglas Barbosa Alexandre f2005fa566 Flush repository cache before import project data
GitHub Pull Requests importer handle with the repository while
importing data, we need to make sure that the cached values are valid.
2016-04-04 19:35:39 -03:00
Douwe Maan f505c753b0 Merge branch 'fix_remove_fork_link' into 'master'
Remove fork link closes all merge requests opened on source project

Currently, if you:

- create a fork
- open a merge request on the source project
- remove the fork link

The created MR cannot be closed.

With this MR, all pending MR is closed when the fork link is removed.

See merge request !3189
2016-04-04 15:37:08 +00:00
Douwe Maan ba7fcc9866 Merge branch 'update_repository_from_ee' into 'master'
Migrate Repository#local_branches from gitlab-ee.

REF: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/249

This will help us to avoid posible merge conflicts when merging
gitlab-ce to gitlab-ee

See merge request !3496
2016-04-04 14:25:15 +00:00
Yorick Peterse 3dd91f55a0 Merge branch 'issue_14853' into 'master'
Fix bug related to filtering Issues by Label/Milestone.

See merge request !3499
2016-04-04 09:05:57 +00:00
Douwe Maan 136267dd35 Merge branch 'fix-bad-fetch' into 'master'
Don't fetch any tags from a forked repo

Closes #13957

See merge request !3504
2016-04-03 12:17:43 +00:00
Rubén Dávila fd090a2fab Fix bug related to filtering Issues by Label/Milestone.
This problem only was affecting the dev env.
2016-04-02 07:36:41 -05:00
Stan Hu b43e059748 Don't fetch any tags from a forked repo
Closes #13957
2016-04-02 00:45:07 -07:00
Rubén Dávila e6b5716785 Migrate Repository#local_branches from gitlab-ee.
This will help us to avoid posible merge conflicts when merging
gitlab-ce to gitlab-ee
2016-04-01 14:21:08 -05:00
Robert Speicher 5627542fd4 Merge branch 'routing' into 'master'
Added & use Gitlab::Routing for URL helpers

Extracted from !3389

See merge request !3486
2016-04-01 16:51:20 +00:00
Robert Speicher c8038dc243 Merge branch 'memoize-pattern-methods' into 'master'
Memoize reference_pattern/link_reference_pattern

Extracted from !3389

See merge request !3485
2016-04-01 16:49:50 +00:00
Rémy Coutable f9ab215b21 Merge branch 'error-when-ldap-doesn-t-supply-an-email-address-14559' into 'master'
Allow temp-oauth-email as notification email

Closes #14559 

/cc @dblessing @rymai 

See merge request !3477
2016-04-01 14:12:42 +00:00
Yorick Peterse 84b0ab7766 Added & use Gitlab::Routing for URL helpers
Rails' "url_helpers" method creates an anonymous Module (which a bunch
of methods) on every call. By caching the output of this method in a
dedicated method we can shave off about 10 seconds of loading time for
an issue with around 200 comments.
2016-04-01 11:13:48 +02:00
Yorick Peterse e7849b0b25 Memoize reference_pattern/link_reference_pattern
These methods are called quite often in loops so by memoizing their
output we can reduce timings a bit.
2016-04-01 11:13:30 +02:00
Douwe Maan 2e3c2a355f Merge branch 'snippets-with-comments-cause-a-500-when-they-show-up-in-search-results-14764' into 'master'
Fix Error 500 when searching for a comment in a project snippet

Closes #14764. /cc @stanhu, and thank you for the spec! ;)

See merge request !3468
2016-04-01 08:38:16 +00:00
connorshea 85cc172959 Remove "Congratulations!" tweet button on newly-created project.
I’ve removed everything related to the feature based on this commit:
ce08f919f34fd8849834365

Resolves #10857.
2016-03-31 17:09:36 -06:00
Zeger-Jan van de Weg 1e7116b34d Exclude projects pending deletion from all results 2016-03-31 20:20:18 +02:00
Zeger-Jan van de Weg 2c6207135e Allow temp-oauth-email as notification email 2016-03-31 19:59:19 +02:00
Rémy Coutable 95c7aa62de Merge branch 'fix-todos' into 'master'
Destroy related todos when an Issue/MR is deleted

Closes #14550 

Closes #14598

See merge request !3376
2016-03-31 16:43:12 +00:00
Rémy Coutable 091b8a6ede Rename Note#for_project_snippet? to #for_snippet?
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-03-31 09:20:27 +02:00
Yorick Peterse 84764847f7 Merge branch 'reorder-project-expire-cache' into 'master'
Expire the exists cache before deletion to ensure project dir actually exists

See merge request !3413
2016-03-30 22:51:36 +00:00
Robert Speicher 3d4848615c Merge branch 'patch/fix-mergerequest-diff' into 'master'
Fix Raw / Rendered diff producing different results on merge requests

The raw diff endpoint (`merge_requests/####.diff`) produces a diff based on `target_branch` instead of the original branching point. Same is valid for `merge_requests/####.patch`.

Fixes #14680, #3017

See merge request !3450
2016-03-30 16:02:19 +00:00
Douglas Barbosa Alexandre 9b93f8adc8 Destroy related todos when an issue is deleted 2016-03-30 12:09:34 -03:00
Dmitriy Zaporozhets f8f68d6b8c Fix few bugs related to recent notifications refactoring
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets 71e7b39843 Refactor creating notification setting with defaults
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets 86418c475b Remove useless Notification model
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets 4ca73f56cb Small refactoring and cleanup of notification logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets b8f3843790 Update NotificationService to use NotificationSettings instead of membership
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets 7ea1bcab45 Create notification setting when membership created
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets 359157c097 Introduce NotificationSetting to user interface
* visiting project will create notification setting if missing
* change notification setting per project even without membership
* use notification settings instead of membership on profile page

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets 31b0e53015 Introduce NotificationSetting model
It will hold notification setting per group or per project. It will
allow get rid of notification level stored in Member model

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Rémy Coutable 4a4398560c Merge branch 'added-milestone-upcoming' into 'master'
Dropdown bug fixes

- Added back upcoming to milestone filter

![Screen_Shot_2016-03-23_at_16.45.22](/uploads/8c31eff7e0984aad17881f6397ff17cd/Screen_Shot_2016-03-23_at_16.45.22.png)

- Fixed bug that would cause the currently selected value to disappear on filters
- Fixed bug that throw an error when filtering by upcoming when there is only a milestone in the past

Closes #14536

See merge request !3368
2016-03-30 06:49:04 +00:00
Gabriel Mazetto 11865ee267 We need sha reference from diff_base_commit to generate the diff 2016-03-29 23:59:51 -03:00
Gabriel Mazetto a9b2a2744c Use diff_base_commit instead of target_branch to generate diffs 2016-03-29 23:59:51 -03:00