Commit Graph
449 Commits
Author SHA1 Message Date
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
Robert Schilling dc39c8372d Adapt tests to new testing guidelines 2016-04-12 15:43:29 +02:00
Robert Schilling 9aefaa41ab Fix code review issues 2016-04-12 14:24:05 +02:00
Robert Schilling ba21c00f01 Delete notes via API 2016-04-12 14:24:05 +02:00
Douglas Barbosa Alexandre 93a10f17e0 Reuse User#notification_settings_for when it's possible 2016-04-11 20:50:26 -03:00
Douglas Barbosa Alexandre 7afeace354 Merge branch 'master' into decouple-member-notification 2016-04-08 15:48:09 -03:00
Drew Blessing 935bf7271d Only update main language if it is not already set 2016-04-06 14:56:40 -05:00
Yorick Peterse e1bc16cbdf Merge branch 'reorder-language' into 'master'
Update language after doing all other operations

See merge request !3533
2016-04-05 13:46:14 +00:00
Kamil Trzcinski aad3b6ddf8 Update language only on HEAD of the repository 2016-04-05 11:08:41 +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
Baldinof 65fa716173 Fix rubocop in unlink fork service specs 2016-04-03 15:17:14 +00:00
Douwe Maan 670f8540fa Merge branch 'fix-mentions-on-confidential-issues-for-non-members' into 'master'
Mentions on confidential issues doesn't create todos for non-members

Closes #14569 

See merge request !3374
2016-04-01 08:36:20 +00:00
Grzegorz Bizon 5ac61d7b24 Improve specs for issue move service 2016-03-31 09:47:05 +02:00
Douglas Barbosa Alexandre 26b2810355 Mentions on confidential issues doesn't create todos for non-members 2016-03-30 18:41:21 -03: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
Grzegorz Bizon f2674c7b98 Refactor uploads rewriter used when moving issue 2016-03-30 10:44:18 +02:00
Grzegorz Bizon 701976e081 Add uploads rewriter and use it when moving issue 2016-03-30 10:44:18 +02:00
Grzegorz Bizon bab50e0133 Preserve time notes has been updated at when moving issue 2016-03-23 13:22:27 +01:00
Douwe Maan 3b39ce3252 Merge branch 'notifications-for-subscribers-confidential-issue-labels' into 'master'
Restrict notifications for confidential issues

Closes #14468 

/cc @rymai 

See merge request !3334
2016-03-23 10:34:20 +00:00
Grzegorz Bizon 915bfedfa7 Do not allow to move issue if it has not been persisted 2016-03-23 09:41:39 +01:00
Douglas Barbosa Alexandre 0a8c9f7212 Restrict notifications for confidential issues 2016-03-22 15:29:57 -03:00
Baldinof fa4126acff Move unlink fork logic to a service 2016-03-22 15:34:35 +01:00
Douwe Maan ae7b2ef62c Merge branch 'master' into issue_12658
# Conflicts:
#	app/models/issue.rb
#	app/views/projects/_home_panel.html.haml
#	app/views/shared/projects/_project.html.haml
#	db/schema.rb
#	spec/models/project_spec.rb
2016-03-21 23:22:21 +01:00
Douwe Maan 45e8650c4f Fix specs 2016-03-20 23:26:58 +01:00
Douwe Maan 19aa20d528 Fix more specs 2016-03-20 23:09:33 +01:00
Grzegorz Bizon d6474f22d2 Preserve created at time of notes when moving issue 2016-03-20 17:05:21 +01:00
Douwe Maan 2eb19ea3ea Merge branch 'master' into issue_12658 2016-03-20 14:57:25 +01:00
Grzegorz Bizon f0211a4ea9 Do not pass params that are not used in issue move service 2016-03-20 09:28:06 +01:00
Grzegorz Bizon 0115ad66d2 Merge branch 'master' into feature/issue-move
* master: (121 commits)
  Dedupe labels in labels selector in Dashboard pages
  Refactor colors and lists
  Add a safeguard in MergeRequest#compute_diverged_commits_count
  Fix an issue when the target branch of a MR had been deleted
  Add avatar to issue and MR pages header
  Cleanup somce css colors
  Re-group scss variables
  Refactor `Todo#target`
  Fixes issue with filter label missing on labels & milestones
  Rename `Todo#to_reference` to `Todo#target_reference`
  Fixed failing tests
  Updated controller with before_action Fixed other issues based on feedback
  Fixes issue on dashboard issues
  Full labels data in JSON
  Fixed issue with labels dropdown getting wrong labels
  Update CHANGELOG
  Use `Note#for_project_snippet?` to skip notes on project snippet
  Use `Commit#short_id` instead of `Commit.truncate_sha`
  Reuse `for_commit?` on conditional validations
  Update schema info comment on todo related files
  ...

Conflicts:
	app/models/issue.rb
	db/schema.rb
	spec/models/issue_spec.rb
2016-03-19 18:50:15 +01:00
Grzegorz Bizon 9b13ce0b7a Improvements in issue move feaure (refactoring)
According to endbosses' suggestions.
2016-03-19 18:46:01 +01:00
Robert Speicher c790107854 Merge branch 'no-gc-retry' into 'master'
Do not retry "git gc"

To prevent 'git gc' timing out on a large repo and then bouncing
around in the retry queue.

See merge request !3266
2016-03-18 20:26:40 +00:00
Zeger-Jan van de WegandFelipe Artur b959ae553b Improve group visibility level feature 2016-03-18 16:58:04 -03:00
Douglas Barbosa Alexandre c29da3f8ca Trigger a todo for mentions on commits page 2016-03-18 11:00:53 -03:00
Jacob Vosmaer 5d9cf7b415 Fix HousekeepingService tests 2016-03-18 14:46:51 +01:00
Douglas Barbosa Alexandre 7ee528336a Restrict access for confidential issues on autocomplete 2016-03-17 20:55:59 -03:00
Douglas Barbosa Alexandre 43d8bdb4f0 Restrict access to references for confidential issues 2016-03-17 20:55:59 -03:00
Felipe Artur 0a7f716119 Code fixes 2016-03-17 19:42:46 -03:00
Yorick Peterse cd05d3f78d Cache project avatars stored in Git
The avatar logic has been moved from Project to Repository as this makes
caching easier. The logic itself in turn has been changed so that the
logo file names are cached in Redis. This cache is flushed upon pushing
a commit but _only_ if:

1. The commit was pushed to the default branch
2. The commit actually changes any of the logo files

If no branch or commit is given the cache is flushed anyway, this
ensures that calling Repository#expire_cache without any arguments still
flushes the avatar cache (e.g. this is used when removing a project).

Fixes gitlab-org/gitlab-ce#14363
2016-03-17 18:51:54 +01:00
Grzegorz Bizon b9036ba610 Prevent issue move if issue has been already moved 2016-03-17 11:48:51 +01:00
Zeger-Jan van de Weg 481e73fb76 Merge branch 'master' into new-branch-button-issue 2016-03-17 11:13:16 +01:00
Grzegorz Bizon 5e3c9475a9 Add minor improvements in code related to issue move 2016-03-17 07:39:16 +01:00
Grzegorz Bizon 1dd279d833 Use helper to create list of projects issue can be moved to
This also adds confirmation message if issue move has been requested.
2016-03-17 07:39:16 +01:00
Grzegorz Bizon 15d32b6a11 Add new notifications for issue move action
[ci skip]
2016-03-17 07:39:16 +01:00
Grzegorz Bizon a23f0e8c9e Reuse existing issue services when moving issue 2016-03-17 07:39:16 +01:00
Grzegorz Bizon a91101b19a Make it possible to move issue if user is a reporter
Discussed it here:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2831#note_4190228
2016-03-17 07:39:16 +01:00
Grzegorz Bizon 310b417b0f Preserve original author when moving issue
This also wrapps entire process into transation, as rewriting references
may have large memory footprint.
2016-03-17 07:39:16 +01:00
Grzegorz Bizon 3c493c24c7 Add reference unfold pipeline used when moving issue 2016-03-17 07:39:15 +01:00
Grzegorz Bizon efd8251751 Minor refactoring of issue move service and specs 2016-03-17 07:39:15 +01:00