summaryrefslogtreecommitdiff
path: root/app/services
Commit message (Collapse)AuthorAgeFilesLines
* Flush all repository caches when deleting a repoexpire-fork-import-cachesYorick Peterse2016-02-171-1/+13
| | | | | | | | This ensures that _all_ caches (including any caches normally only flushed under certain conditions) are flushed whenever a project is removed. Because cache keys are based on project namespaces (excluding IDs) not doing so could result in a newly created project re-using old caches (if the project was re-created using the same name).
* Merge branch 'fix/cross-reference-notes-forks' into 'master' Douwe Maan2016-02-161-5/+14
|\ | | | | | | | | | | | | | | | | Fix cross reference notes on forks Updates `cross_reference_exists?` to match on commit only. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/5849 See merge request !2731
| * updated system note service and spec based on feedbackJames Lopez2016-02-161-1/+3
| |
| * woo hoo - getting there with the cross-reference issue. Should fix the ↵James Lopez2016-02-121-4/+11
| | | | | | | | problem and updated spec
| * Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵James Lopez2016-02-121-12/+7
| |\ | | | | | | | | | fix/cross-reference-notes-forks
| * \ Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵James Lopez2016-02-101-2/+7
| |\ \ | | | | | | | | | | | | fix/cross-reference-notes-forks
| * | | WIP - fix and spec for cross reference issue with forksJames Lopez2016-02-041-2/+2
| | | |
* | | | Merge branch 'fix-duplicate-hook-notifications' into 'master' Douwe Maan2016-02-122-10/+2
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix duplicated branch creation/deletion Web hooks/service notifications when using Web UI Similar to 423d2d6, except duplicates occurred only if a Web service (e.g. Slack) were configured. When deleting a branch, this is what was happening: 1. DeleteBranchService calls execute_hooks and execute_services 2. The call to repository.rm_branch triggers the GitHooksService. 3. This, in turn, calls GitPushService and then calls the same hooks/services again. 5145706 now makes it no longer necessary for DeleteBranchService and CreateBranchService to execute the branch hooks/services. Note that tags behave differently in GitTagPushService and GitPushService is not called. Closes #10330 See merge request !2763
| * | | Fix duplicated branch creation/deletion Web hooks/service notifications when ↵Stan Hu2016-02-092-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | using Web UI Similar to 423d2d6, except duplicates occurred only if a Web service (e.g. Slack) were configured. When deleting a branch, this is what was happening: 1. DeleteBranchService calls execute_hooks and execute_services 2. The call to repository.rm_branch triggers the GitHooksService. 3. This, in turn, calls GitPushService and then calls the same hooks/services again. 5145706 now makes it no longer necessary for DeleteBranchService and CreateBranchService to execute the branch hooks/services. Note that tags behave differently in GitTagPushService and GitPushService is not called. Closes #10330
* | | | Improve CI status badge implementationGrzegorz Bizon2016-02-111-12/+7
| |_|/ |/| |
* | | Smarter flushing of branch statistics cachesYorick Peterse2016-02-091-2/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Cache various Repository Git operationscaching-repository-git-operationsYorick Peterse2016-02-081-0/+4
|/ | | | | | | | | | | | | | 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.
* Support Akismet spam checking for creation of issues via APIStan Hu2016-02-021-0/+13
| | | | | | | Currently any spam detected by Akismet by non-members via API will be logged in a separate table in the admin page. Closes #5612
* First pass at deleting projects in the background.Josh Frye2016-01-293-2/+8
|
* [WIP] Background process note logic for #3948Josh Frye2016-01-282-17/+32
|
* Move Gitlab::BitbucketImport::KeyDeleter to it's own importerDouglas Barbosa Alexandre2016-01-261-4/+0
|
* Extract Projects::ImportService service from RepositoryImportWorkerDouglas Barbosa Alexandre2016-01-251-0/+71
|
* Creator should be added as a master of the project on creationDouglas Barbosa Alexandre2016-01-201-1/+1
| | | | | This also enable a project creator to add themselves as a master of the project.
* Fix creator should be added as a master of the project on creationDouglas Barbosa Alexandre2016-01-191-1/+1
|
* This will ensure previous assignee gets an email even if his notif level is ↵fix-consider-re-assign-as-a-mentionRémy Coutable2016-01-151-5/+4
| | | | "on mention"
* Consider re-assign as a mention from a notification point of viewRémy Coutable2016-01-151-5/+11
| | | | | This will ensure new assignee gets an email even if his notif level is "on mention".
* Merge branch 'backport-ee' into 'master' Robert Speicher2016-01-141-1/+1
|\ | | | | | | | | | | | | Backport two commits from EE Backport part of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/110 See merge request !2424
| * Param should be present, not just truthybackport-eeDouwe Maan2016-01-141-1/+1
| |
* | Merge branch 'feature/ldap-sync-edgecases' into 'master' Douwe Maan2016-01-141-0/+17
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Code style fixes and some code simplifiedGabriel Mazetto2016-01-081-8/+10
| |
| * Repair ldap_blocked state when no ldap identity exist anymoreGabriel Mazetto2016-01-081-0/+15
| |
* | Merge branch 'add_username_to_user_system_hooks' of ↵Dmitriy Zaporozhets2016-01-131-1/+4
|\ \ | | | | | | | | | | | | | | | https://github.com/tbeadle/gitlabhq Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | Include user_username in user_(add_to/remove_from)_(project/group) system hooks.Tommy Beadle2016-01-071-0/+2
| | |
| * | Include the username in user_create/destroy system hooks.Tommy Beadle2016-01-071-1/+2
| | |
* | | Merge pull request #9952 from tbeadle/user_id_in_member_system_hookDmitriy Zaporozhets2016-01-131-0/+1
|\ \ \ | | | | | | | | Include the user_id in user_*_team system hooks.
| * | | Include the user_id in user_*_team system hooks.Tommy Beadle2016-01-061-0/+1
| |/ / | | | | | | | | | | | | | | | 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.
* | | Generate builds when creating tag using web interfacefix-ci-builds-for-tagsKamil Trzcinski2016-01-111-0/+1
| | |
* | | Merge branch 'fix-duplicate-branch-activity' of ↵Dmitriy Zaporozhets2016-01-112-2/+0
|\ \ \ | | | | | | | | | | | | https://gitlab.com/stanhu/gitlab-ce
| * | | Fix duplicated branch creation/deletion events when using Web UIStan Hu2016-01-082-2/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When deleting a branch, this is what was happening: 1. DeleteBranchService calls EventCreateService and creates an event. 2. The call to repository.rm_branch triggers the GitHooksService. 3. This, in turn, calls GitPushService and then calls EventCreateService again. 5145706c now makes it no longer necessary for DeleteBranchService and CreateBranchService to create an event. Closes #4304
* | | Merge gitlab.com:gitlab-org/gitlab-ceJeroen Nijhof2016-01-112-14/+2
|\ \ \
| * \ \ Merge branch 'api-project-upload' into 'master' Robert Speicher2016-01-082-14/+2
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | Add API project upload endpoint Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4317 See merge request !2329
| | * | DRY up upload and download servicesapi-project-uploadDouwe Maan2016-01-082-24/+2
| | | |
| | * | Add API project upload endpointDouwe Maan2016-01-072-2/+12
| | |/
* | | Merge gitlab.com:gitlab-org/gitlab-ceJeroen Nijhof2016-01-081-3/+3
|\ \ \ | |/ /
| * | Merge branch 'master' into milestone-refDouwe Maan2016-01-053-1/+14
| |\ \ | | |/
| * | Merge branch 'master' into milestone-refDouwe Maan2015-12-245-27/+53
| |\ \
| * | | Use `to_reference` in system notes.Douwe Maan2015-12-241-1/+1
| | | |
| * | | Link to milestone in "Milestone changed" system noteDouwe Maan2015-12-241-2/+2
| | | |
* | | | Merge gitlab.com:gitlab-org/gitlab-ceJeroen Nijhof2016-01-0641-423/+646
|\ \ \ \ | | |_|/ | |/| |
| * | | Don't notify users twice if they are both project watchers and subscribersStan Hu2016-01-041-0/+1
| | | | | | | | | | | | | | | | Closes #4708
| * | | Added system hooks messages for renaming and transferring a projectSteve Norman2016-01-042-1/+13
| | |/ | |/|
| * | Merge branch 'edit-on-fork' into 'master' Dmitriy Zaporozhets2015-12-243-17/+28
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically fork a project when not allowed to edit a file. Fixes #3215. To do: - [ ] Add tests ----- ## "Edit" button on file in a project the user does NOT have write access to ![edit_file](/uploads/7602157420768aef483a6586bba2d164/edit_file.png) ## Clicking will automatically create a fork ![during_fork](/uploads/32f4f5dff9f24ea99522000b0bf881c5/during_fork.png) ## When the fork has been created, the user is returned to the edit page on the original project with a notice ![edit_notice](/uploads/94ed1319404370ff1e9c0d672fb41e03/edit_notice.png) ## The user cannot change the target branch and is informed that editing will start an MR ![edit_footer](/uploads/4da68d4795c7177e575b7c434d16eeae/edit_footer.png) ## Hitting "Commit changes" will commit and start an MR from my fork to the origin project ![Screen_Shot_2015-12-17_at_23.38.08](/uploads/d777a4db6f38a5a1be84031694465bc1/Screen_Shot_2015-12-17_at_23.38.08.png) ----- ## "Create file, "Upload file" and "New directory" buttons in a project the user does NOT have write access to ![new_directory](/uploads/72f556248f30d6652523bbb4be01b3e0/new_directory.png) ## Clicking any of these options will automatically create a fork ![during_fork](/uploads/32f4f5dff9f24ea99522000b0bf881c5/during_fork.png) ## When the fork has been created, the user is returned to the tree page on the original project with a notice ![new_directory_notice](/uploads/a1a3e11308ae0e8f0913fae6813a37ed/new_directory_notice.png) ## Clicking "New directory" again will show the modal. The user cannot change the target branch and is informed that editing will start an MR ![new_dir](/uploads/99ca8cbfb2f70603e352b3fdf67b6281/new_dir.png) ## Hitting "Create directory" will commit and start an MR from my fork to the origin project ![Screen_Shot_2015-12-17_at_23.39.19](/uploads/3713d0235abf831361b803a6198c5bc1/Screen_Shot_2015-12-17_at_23.39.19.png) cc @dzaporozhets @skyruler See merge request !2145
| | * | Automatically fork a project when not allowed to edit a file.Douwe Maan2015-12-183-17/+28
| | | |
| * | | Merge branch 'fix/visibility-level-setting-in-forked-projects' into 'master' Douwe Maan2015-12-242-9/+24
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix/visibility level setting in forked projects Fixes #3136 /cc @DouweM See merge request !1744
| | * \ \ Merge branch 'master' into fix/visibility-level-setting-in-forked-projectsTomasz Maczukin2015-12-2129-168/+345
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (723 commits) Bump Rack Attack to v4.3.1 for security fix Remove duplicate entry in the changelog Remove extra spaces after branchname Fix merge-request-reopen button title Add branch and tag operation to tree dropdown Use gitlab-shell 2.6.9 Clarify Windows shell executor artifact upload support Fix feature specs: we always show the build status if ci_commit is present Do not display project group/name when issue and MR are in same project Don't create CI status for refs that doesn't have .gitlab-ci.yml, even if the builds are enabled Use gitlab-workhorse 0.5.1 Fix ci_projects migration by using the value only from latest row [ci skip] Revert sidebar position for issue and merge request Add info on using private Docker registries in CI [ci skip] Upgrade Poltergeist to 1.8.1. #4131 Fix ux issue with "This issue will be closed automatically" message Move MR Builds tab next to Commits Api support for requesting starred projects for user Fix Rubocop complain. Fix merge widget JS for buttons ... Conflicts: app/models/project.rb