Commit Graph
870 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 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
Rémy Coutable 074c239390 Merge branch 'issue_14012' into 'master'
Fix problem when creating milestones in groups without projects

Fixes #14012 

See merge request !3481
2016-04-07 15:19:56 +00:00
Felipe Artur 0bef4b9764 Implement review suggestions 2016-04-07 10:59:24 -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
Kamil Trzcinski b8d1545bf1 Update language after doing all other operations 2016-04-05 10:54:34 +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 a6b5b50e14 Fix incorrect variable name 2016-04-04 14:41:01 +00: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
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
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
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
Douwe Maan 98df8aab7e Merge branch 'fix/issue-move-rewrite-uploads' into 'master'
Rewrite uploads when moving issue to another project

Closes #14531

See merge request !3382
2016-04-01 07:17:10 +00:00
Zeger-Jan van de Weg 1e7116b34d Exclude projects pending deletion from all results 2016-03-31 20:20:18 +02: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
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 86418c475b Remove useless Notification model
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets 08b3d7f6ef Refactor notification helper and fix notification service
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 e64b1e52a2 Check if GFM rewriters need rewrite internally 2016-03-30 10:44:18 +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
Kamil Trzciński fc6ee35928 Merge branch 'feature-ci-only-except-trigger' into 'master'
CI: Add 'triggers' keyword to 'only' and 'except' lists to allow control over when triggers cause builds to run

Currently, the `only` and `except` keywords in `.gitlab-ci.yml` only accept ref names or the special `branches` and `tags` keywords. However, these are primarily useful when controlling how repository activity affects the creation of builds. In my case, instead of building on every commit, I'd like to use the following logic:

- If the repository is tagged, do a build.
- Any other normal commits should not cause a build.
- If a build is triggered via the API, always create one for the specified ref.

From what I can tell, this isn't possible via the existing YAML syntax. In this MR, I introduce a new keyword `triggers` that goes along with `branches` and `tags`. I can implement the logic above using the following job configuration:

```yaml
only:
  - tags
  - triggers
```

I updated the tests and documentation to reflect this and everything seems to pass.

See merge request !3230
2016-03-22 09:42:40 +00:00
Douwe Maan 31266c5be4 Address feedback 2016-03-22 00:09:20 +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 8db1292139 Tweaks, refactoring, and specs 2016-03-20 21:04:07 +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 797af06491 Merge branch 'master' into feature/issue-move
* master:
  Fix bug where wrong commit ID was being used in a merge request diff to show old image
  Remove CHANGELOG item that was added during merge resolution
  Improve the "easy WIP & un-WIP from link" feature
  Fix specs
  \#to_branch_name now uses the iid as postfix
  Add label description in tooltip to labels in issue index and sidebar
  Easily (un)mark merge request as WIP using link
  Use specialized system notes when MR is (un)marked as WIP
  another attempt to fix oauth issue
  attempting to fix omniauth problem

Conflicts:
	app/assets/javascripts/issuable_form.js.coffee
2016-03-20 11:01:08 +01:00
Grzegorz Bizon 323d328c86 Rename reference unfolder to rewriter, minor refactorings 2016-03-20 10:14:25 +01:00
Jacob Schatz 3f22a92f4a Merge branch 'remove-wip' into 'master'
Easily (un)mark merge request as WIP using link

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3768 and https://gitlab.com/gitlab-org/gitlab-ce/issues/3516

## Link to add `WIP` prefix (underline is visible because of hover)
![wipless_title](/uploads/72a6f7119ba9d8043ca8329641e97c3b/wipless_title.png)

## Link to remove `WIP` prefix
![wip_title](/uploads/8620ad65da9ef620b180603520fead55/wip_title.png)

## System note after WIP is added
![wip_sysnote](/uploads/2de073b75e854d2c9e243eb8b5d5c259/wip_sysnote.png)

## Widget with link to remove WIP
![wip_widget](/uploads/cf83ea93743c4c26d9df759c17cb9d7b/wip_widget.png)

## Flash after WIP is removed
![wip_flash](/uploads/27b7240cd5d7ceeb8b7b477abd94d7ff/wip_flash.png)

## System note after WIP is removed
![wipless_sysnote](/uploads/c0d3368abdf21a2f253532a9a9594d90/wipless_sysnote.png)

## Widget when current user cannot remove the WIP prefix
![wip_widget_unauthorized](/uploads/174ccf1674be86dc81c3078fe297acb7/wip_widget_unauthorized.png)

cc @creamzy 

See merge request !3006
2016-03-19 20:06:59 +00:00
Douwe Maan cb124d1476 Merge branch 'issue-branch-iid-postfix' into 'master'
#to_branch_name now uses the iid as postfix

Given the branch name 'mep-mep' with an iid being 1,
the current way, master's way, would yield a branch name of
1-mep-mep. The problem for larger projects however would be that
a developer might forget what iid the issue was.

When this developer would try to tab complete it would:
- Or result in 20+ branches possibly
- Or start with the wrong digit, try again with digit++
  - Would see 20 branches, repeat

Thus the obvious way of solving this is letting the dev tab complete
on the issue title, which is easier to remember.

@DouweM Should this be labelled `pick-in-master`? 

See merge request !3308
2016-03-19 18:54:18 +00:00
Grzegorz Bizon 18f25bc942 Update reference unfolder according to recent ability changes
Commit 43d8bdb4f0 introduced additional
checks for permissions to read issue in references extractor.
2016-03-19 18:58:52 +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
Felipe Artur 8b830b8c3b Fix specs 2016-03-18 21:04:53 -03:00
Rémy Coutable cafa408b25 Merge remote-tracking branch 'origin/master' into remove-wip 2016-03-18 23:29:18 +01:00
Rémy Coutable 0b942541da Improve the "easy WIP & un-WIP from link" feature 2016-03-18 23:27:35 +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