Commit Graph
337 Commits
Author SHA1 Message Date
Douwe Maan 52a8d1f3c6 Merge branch 'fix/gitpushservice-complexity-issue' into 'master'
Reduce code complexity on GitPushService#execute

Code complexity for gitlab-ce after this has been refactored:
```
  27.3: GitPushService#execute
```
This still needs to be merged into `gitlab-ee` presumably with conflicts... Perhaps we should create another issue for doing that?

I left the code sort of similar to what it was... If I could, I would have refactored most of the code into separate classes, etc. as it breaks probably all SOLID principles.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/13327


See merge request !2784
2016-02-18 09:33:21 +00:00
James Lopez c110c9bd7f refactored spec 2016-02-17 18:29:43 +01:00
Jacob Vosmaer a0ccb0731b Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into git-archive-refactor 2016-02-17 11:30:42 +01:00
James Lopez 5255a54df9 refactored some stuff based on MR feedback 2016-02-17 10:42:59 +01:00
James Lopez 11913a762a updated system note service and spec based on feedback 2016-02-16 09:01:56 +01:00
James Lopez 20e79f714a refactored GitPushService and updated spec 2016-02-15 15:51:00 +01:00
James Lopez 99a50447a1 fix rubocop warning 2016-02-12 18:21:01 +01:00
James Lopez 4089be8fed woo hoo - getting there with the cross-reference issue. Should fix the problem and updated spec 2016-02-12 18:01:47 +01:00
James Lopez 77d2aeabec attempt to reduce code complexity on GitPushService#execute 2016-02-11 12:50:27 +01:00
James Lopez 3753c1e03e Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/cross-reference-notes-forks 2016-02-10 14:56:27 +01:00
Yorick Peterse 2ce0d06389 Smarter flushing of branch statistics caches
Instead of flushing the behind/ahead counts for all branches upon every
push we now only flush the cache of branches that actually need to have
these statistics recalculated. There are now basically 2 scenarios and
their effects:

1. A user pushes a commit to the default branch, this results in the
   cache being flushed for all branches.
2. A user pushes to a non default branch, this results in _only_ the
   cache for that branch being flushed.

The existing code (Repository#expire_cache) remains backwards compatible
with the previous behaviour, the new behaviour is only applied when a
branch name is passed as an argument. This ensures that when for example
a project is deleted the cache for all branches is flushed.
2016-02-09 17:17:56 +01:00
Yorick Peterse 9a99d8e49d Cache various Repository Git operations
This caches the output of the following methods:

* Repository#empty?
* Repository#has_visible_content?
* Repository#root_ref

The cache for Repository#has_visible_content? is flushed whenever a
commit is pushed to a new branch or an existing branch is removed.
The cache for Repository#root_ref is only flushed whenever a user
changes the default branch of a project. The cache for Repository#empty?
is never explicitly flushed as there's no need for it.
2016-02-08 15:40:19 +01:00
James Lopez a64d881bac fixed spec - at last! 2016-02-05 17:43:05 +01:00
James Lopez 9b925d79c9 WIP - fix and spec for cross reference issue with forks 2016-02-04 18:36:16 +01:00
Jacob Vosmaer 771f14b96e First version of "git archive" headers 2016-02-02 14:09:55 +01:00
Josh Frye f3d4f2eac7 Fix Rubocop error 2016-01-28 14:44:45 -05:00
Josh Frye c95bc65519 Update tests 2016-01-28 13:04:42 -05:00
Douglas Barbosa Alexandre 6dd88e090e Extract Projects::ImportService service from RepositoryImportWorker 2016-01-25 22:58:30 -02:00
Rubén Dávila 86b75f4713 Use a MR with commits. 2016-01-20 14:41:23 -05:00
Douglas Barbosa Alexandre 2ece1b774a Fix creator should be added as a master of the project on creation 2016-01-19 13:24:42 -02:00
Rémy Coutable 30a4f4c9e0 This will ensure previous assignee gets an email even if his notif level is "on mention" 2016-01-15 17:57:45 +01:00
Rémy Coutable 51266f41b3 Consider re-assign as a mention from a notification point of view
This will ensure new assignee gets an email even if his notif level is
"on mention".
2016-01-15 15:28:16 +01:00
Douwe Maan 4d64a32c88 Merge branch 'feature/ldap-sync-edgecases' into 'master'
LDAP Sync blocked user edgecases

Allow GitLab admins to block otherwise valid GitLab LDAP users
(https://gitlab.com/gitlab-org/gitlab-ce/issues/3462)

Based on the discussion on the original issue, we are going to differentiate "normal" block operations to the ldap automatic ones in order to make some decisions when its one or the other.

Expected behavior:

- [x] "ldap_blocked" users respond to both `blocked?` and `ldap_blocked?`
- [x] "ldap_blocked" users can't be unblocked by the Admin UI
- [x] "ldap_blocked" users can't be unblocked by the API
- [x] Block operations that are originated from LDAP synchronization will flag user as "ldap_blocked"
- [x] Only "ldap_blocked" users will be automatically unblocked by LDAP synchronization
- [x] When LDAP identity is removed, we should convert `ldap_blocked` into `blocked`
 
Mockup for the Admin UI with both "ldap_blocked" and normal "blocked" users:
![image](/uploads/4f56fc17b73cb2c9e2a154a22e7ad291/image.png)

There will be another MR for the EE version.

See merge request !2242
2016-01-14 11:00:08 +00:00
Dmitriy Zaporozhets 32a5b741c2 Merge branch 'add_username_to_user_system_hooks' of https://github.com/tbeadle/gitlabhq
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-13 10:12:30 +01:00
Dmitriy Zaporozhets 678ee247ee Merge pull request #9952 from tbeadle/user_id_in_member_system_hook
Include the user_id in user_*_team system hooks.
2016-01-13 10:09:37 +01:00
Robert Speicher af68897acd Merge branch 'api-project-upload' into 'master'
Add API project upload endpoint

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4317

See merge request !2329
2016-01-08 20:29:43 +00:00
Gabriel Mazetto 47e4613f4a Code style fixes and some code simplified 2016-01-08 16:26:04 -02:00
Gabriel Mazetto ec67e9be1d Repair ldap_blocked state when no ldap identity exist anymore 2016-01-08 16:26:04 -02:00
Douwe Maan 0614793b38 DRY up upload and download services 2016-01-08 17:38:53 +01:00
Tommy Beadle 1f64332e11 Include user_username in user_(add_to/remove_from)_(project/group) system hooks. 2016-01-07 12:54:54 -05:00
Tommy Beadle dada25d447 Include the username in user_create/destroy system hooks. 2016-01-07 12:54:35 -05:00
Tommy Beadle 4d41294d71 Include the user_id in user_*_team system hooks.
This fixes an issue where the user_id is not included in the data for
user_add_to_team and user_remove_from_team system hooks.  The documentation
already states that the user_id should be included.
2016-01-06 11:49:59 -05:00
Douwe Maan 2474a5921f Merge branch 'master' into milestone-ref 2016-01-06 13:06:50 +01:00
Douwe Maan b541446389 Fix notification spec 2016-01-05 18:17:55 +01:00
Douwe Maan fd91b48f24 Merge branch 'master' into milestone-ref 2016-01-05 16:40:23 +01:00
Douwe Maan 2479af4d5a Merge branch 'pr-9938' into 'master'
Merge pull request GH-9938 from huacnlee/hotfix/note_mail_with_notification

Hotfix note mail with notification

See merge request !2288
2016-01-05 14:00:13 +00:00
Stan Hu 93096247d8 Don't notify users twice if they are both project watchers and subscribers
Closes #4708
2016-01-04 15:01:52 -08:00
Douwe MaanandRobert Speicher 12ce1cbfcf Merge pull request GH-9938 from huacnlee/hotfix/note_mail_with_notification
Hotfix note mail with notification
2016-01-04 13:33:58 -05:00
Steve Norman 79ec7f2897 Added system hooks messages for renaming and transferring a project 2016-01-04 13:48:00 +00:00
Douwe Maan 9a0e16f454 Fix spec 2015-12-25 13:20:20 +01:00
Douwe Maan ef8b1dbf21 Merge branch 'master' into milestone-ref 2015-12-24 21:19:17 +01:00
Douwe Maan 396c5c97dd Fix specs 2015-12-24 20:34:13 +01:00
Douwe Maan 676678e550 Link to milestone in "Milestone changed" system note 2015-12-24 14:44:17 +01:00
Douwe Maan 84e75ebd4c Merge branch 'fix/visibility-level-setting-in-forked-projects' into 'master'
Fix/visibility level setting in forked projects

Fixes #3136

/cc @DouweM 

See merge request !1744
2015-12-24 12:09:38 +00:00
Tomasz Maczukin c301ab0404 Add some specs for forked project visibility_level cases 2015-12-24 10:33:26 +01:00
Drew Blessing f177aaa5fa Backport JIRA service 2015-12-18 14:19:48 -06:00
Kamil Trzcinski 58a56a0396 Don't create CI status for refs that doesn't have .gitlab-ci.yml, even if the builds are enabled 2015-12-17 16:33:47 +01:00
Gabriel Mazetto b5291f9599 Fixed Rubocop offenses 2015-12-15 00:53:52 -02:00
Kamil Trzciński c810234357 Merge branch 'ci-project-migrate' into 'master'
Ci Project migrate

- This doesn't migrate: allow_git_fetch, coverage_regex, timeout. Since this are project configuration settings I would propose to migrate them to `.gitlab-ci.yml`.
- This requires offline migrations.
- It simplifies database models making all CI objects to be attached to: Project.
- It removes Ci::Project, but makes /ci/projects working by adding method: Project.find_by_ci_id for backward compatibility (badges, triggers).
- We should add default `timeout` to Application Settings.
- It misses specs.
- It is based on ci-services-migrate for now.
- It removes CI events.
- It removes administrator CI projects overview.
- It removes CI application settings.

In 8.4 or 8.5 we can remove redundant tables and columns.


See merge request !1987
2015-12-14 10:35:40 +00:00
Kamil Trzciński e81ae1e68c Merge branch 'ci-services-migrate' into 'master'
Ci Services migrate



See merge request !1985
2015-12-14 10:32:57 +00:00