Commit Graph
773 Commits
Author SHA1 Message Date
James Lopez efde96e9cd started refactored the dynamic rules to be defined in a yml file 2016-04-06 18:12:41 +02:00
James Lopez e05bc61144 fix project snippets json issue 2016-03-14 12:58:01 +01:00
James Lopez ba1fcf3619 added commits and merge request diffs to export 2016-03-14 12:29:46 +01:00
James Lopez 5fbcfab63f Merge branches 'feature/project-export' and 'master' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export 2016-03-14 11:26:34 +01:00
Yorick PeterseandRobert Speicher ec349dc1b6 Refactor Gitlab::ProjectSearchResults
Previously this class would be given a project ID which was then used to
retrieve the corresponding Project object. However, in all cases the
Project object was already known as it was used to grab the ID to pass
to ProjectSearchResults. By just passing a Project instead we remove the
need for an extra query as well as the need for some other complexity
in this class.
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 42fde69d39 Refactor Gitlab::SnippetSearchResults
This removes the need for plucking snippet IDs into memory.
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 013542965c Refactor Gitlab::SearchResults
Instead of plucking IDs this class now uses ActiveRecord::Relation
objects. Plucking IDs is problematic as searching for projects can lead
to a huge amount of IDs being loaded into memory only to be used as an
argument for another query (instead of just using a sub-query).
2016-03-11 15:25:22 -05:00
James Lopez 66d3f98582 add id to project member user json 2016-03-11 17:06:12 +01:00
James Lopez eb2b9e3efc fix project members json to include user 2016-03-11 11:23:59 +01:00
James Lopez 2fd3023186 fix project members export 2016-03-11 09:46:00 +01:00
ashleys 4cd9a5208c web hooks to webhooks 2016-03-10 14:48:29 -05:00
James Lopez a7acfa6614 add project members to export 2016-03-10 16:29:38 +01:00
James Lopez 4b88b4ffd5 fix wiki path issues and spec 2016-03-09 10:35:38 +01:00
Dmitriy Zaporozhets 0f14980383 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2016-03-09 10:13:09 +01:00
James Lopez f9c6168cc4 fix new line issue 2016-03-08 18:20:32 +01:00
Yorick Peterse cb5a5ba095 Cache & flush tag/branch counts
The methods used for this are Repository#tag_count and
Repository#branch_count which cache their output in Redis as well as
memoizing it in an instance variable. Both methods have a corresponding
methods/hooks to flush the caches at the right time.
2016-03-08 18:19:40 +01:00
James Lopez 99d87d8698 WIP - added wiki repo bundler 2016-03-08 18:17:57 +01:00
James Lopez 556cafa44e added repo bundler spec and refactored some of the export code 2016-03-08 15:53:32 +01:00
James Lopez 4e73f9827c WIP - started working on bundle the repo, refactored some stuff and updated spec 2016-03-08 12:35:37 +01:00
tiagonbotelhoandYorick Peterse 4929592458 adds test for git push service for updating the language of the project 2016-03-07 21:59:39 +01:00
tiagonbotelhoandYorick Peterse 96c0255107 moves the main_language update logic to git push service 2016-03-07 21:59:39 +01:00
James Lopez f9eb3fc0aa WIP - initial export service and spec 2016-03-07 18:26:15 +01:00
Douwe Maan 99f08b3f72 Merge branch 'feature/cross-project-labels' into 'master'
Add support for cross project references for labels

## Summary

Support for cross project references for labels.

## Rationale

1.   Cross project label references are currently not supported in GitLab
1.   `to_reference` method signature in `Label` model breaks the abstraction introduced in `Referable`.

      `concerns/referable.rb:  def to_reference(_from_project = nil)`

      Signatures:

      ```
      label.rb:           def to_reference(format = :id)

      commit_range.rb:    def to_reference(from_project = nil)
      commit.rb:          def to_reference(from_project = nil)
      external_issue.rb:  def to_reference(_from_project = nil)
      group.rb:           def to_reference(_from_project = nil)
      issue.rb:           def to_reference(from_project = nil)
      merge_request.rb:   def to_reference(from_project = nil)
      milestone.rb:       def to_reference(from_project = nil)
      project.rb:         def to_reference(_from_project = nil)
      snippet.rb:         def to_reference(from_project = nil)
      user.rb:            def to_reference(_from_project = nil)
      ```

     This MR suggests using `def to_reference(from_project = nil, format: :id)` which makes use of keyword arguments and preserves abstract interface.

1.   We need support for cross project label references when we want to move issue to another project

     It may happen that issue description, system notes or comments contain reference to label and this reference will be invalid after moving issue to another project and will not be displayed correctly unless we have support for cross project references.

     Merge request that needs this feature: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2831


I think that cross project label references may be useful, (example: `Hey, see our issues for CI in GitLab CE! - gitab-org/gitlab-ce~"CI"`).

cc @JobV @DouweM @rspeicher 

See merge request !2966
2016-03-07 09:16:22 +00:00
Douwe Maan 5a07032d26 Merge branch 'security_bug_fix_close_issue' into 'master'
[Security] Automatic issue closing

Fixes https://dev.gitlab.org/gitlab/gitlabhq/issues/2640

See merge request !1944
2016-03-05 00:20:50 +00:00
Jacob Vosmaer 1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
Valery Sizov 21a05328ff Security: Fix issue auto closing 2016-03-03 16:42:44 +02:00
Grzegorz Bizon 65ba4da925 Add support for keyword arguments in label reference method 2016-03-03 10:41:11 +01:00
Rubén Dávila 0c116d8ed6 Check for conflicts before creating target branch. 2016-03-01 19:16:27 -05:00
Robert Speicher 2c6e34bc16 Merge branch 'repository-caching-refactor' into 'master'
Refactor Repository Caching

Related issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/13515

See merge request !2936
2016-02-26 22:07:50 +00:00
Douglas Barbosa Alexandre c1482943c4 Does not create a todo when commenting on commit or project snippet 2016-02-24 21:09:40 -03:00
Yorick Peterse ff28a7cc36 Moved cache expiration code to Repository hooks
This keeps all the cache expiration code in a single file/class instead
of spreading it all across the codebase.
2016-02-23 12:02:59 +01:00
Kamil Trzcinski 7c288c07f1 Check the HEAD of branch when doing Merge When Succeeded 2016-02-22 10:34:09 +01:00
Douglas Barbosa Alexandre 04d1b41258 Merge branch 'tasks' into 'master'
Add Todos

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

Tasks:

-  Prepare database
 - [X] Create a new table (`todos`)
- Tasks Queue view
 - [X] Add a number icon showing the number of todos on the top right next to the new and logout button that will redirect the user to the todos page
 - [X] Add a chronological list of todos, with the 'Todos' tab active by default
 - [X] Add a 'Done' button to each todo
 - [x] Add filters (project, author, type, and action)
- Todos generation
 - [X] When user issue/mr is assgined to someone
 - [x] When user is mentioned on (issues/mr's/comments)
- Mark todo as `done`
 - [X] When clicks on the 'Done' button
 - [X] When edit issue/mr
 - [X] When left/edit a comment
 - [X] When reassign issue/mr
 - [X] When add/remove labels to issue/mr
 - [X] When issue/mr is closed
 - [X] When mr is merged
 - [X] When added an emoji
 - [X] When changed the issue/mr milestone

* Screenshot:

![Screenshot_2016-02-20_12.45.57](/uploads/4b2554b1bde25aed3347e1ae41e8e0c0/Screenshot_2016-02-20_12.45.57.png)

See merge request !2817
2016-02-22 02:36:41 +00:00
Douglas Barbosa Alexandre 3d52e139b1 Rename Tasks to Todos 2016-02-20 12:39:27 -02:00
Douglas Barbosa Alexandre 408e010d65 Rename IssuableBaseService#have_changes? to has_changes? 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre ce78813c2a Create or mark task pending as soon the action happens 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre fc3f8a8ff7 Ensure that we only have one task per issue/mr 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre 4465613647 Explicit mention of the assignee make a task
Since potentially the previous assign-task has already been handled.
2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre 424cb9ccae 💄 Cosmetic changes 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre 3b98adcc75 Create a pending task when a user is mentioned when edit a issue/mr/note 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre 4120b7941d Does not create a task if new assignee is the current user 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre 1d476b0656 Create a pending task when a user is mentioned on a note 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre 14fc05ebfd Create a pending task when a user is mentioned on issue/mr 2016-02-20 12:10:26 -02:00
Douglas Barbosa Alexandre 4bfc377ff6 Rename TaskService#mark_as_done to mark_pending_tasks_as_done 2016-02-20 12:10:26 -02:00
Douglas Barbosa Alexandre 56a5fc0cd3 Move common behavior to to IssuableBaseService 2016-02-20 12:10:26 -02:00
Douglas Barbosa Alexandre 372cdf4ce5 Marks pending tasks for an user as done when he merge the MR 2016-02-20 12:10:26 -02:00
Douglas Barbosa Alexandre c86b12bf69 Marks pending tasks for an user as done when he close the MR 2016-02-20 12:10:26 -02:00
Douglas Barbosa Alexandre 7bed6ee21d Marks pending tasks for an user as done when he edit a MR 2016-02-20 12:10:26 -02:00
Douglas Barbosa Alexandre 802bf6d012 Create a pending task when an MR is assigned to someone 2016-02-20 12:10:26 -02:00
Douglas Barbosa Alexandre 9da03c45c9 Mark pending tasks for the current user as done when he edit a note 2016-02-20 12:10:26 -02:00