summaryrefslogtreecommitdiff
path: root/app/services
Commit message (Collapse)AuthorAgeFilesLines
...
* | Don't mark merge request as updated when merge status relative to target ↵merge-status-without-timestampsDouwe Maan2015-03-231-9/+3
|/ | | | branch changes.
* Extend push_tag event to include tag message and last commitKamil Trzcinski2015-03-213-34/+47
|
* Merge branch 'fix-underscore-notes' into 'master'Hannes Rosenögger2015-03-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix cross-references that contain underscores ### What does this MR do? Cross-references that contain underscores confuse the Markdown renderer and don't work properly. For example: 1. In `myacct/project_one#456`, add a comment that includes a reference to `myacct/project_two#123`. 2. The comment in `myacct/project_one#456` links correctly. 3. The system note in `myacct/project_two#123` is incorrectly linked as: `mentioned in issue myacct/projectone#456_` This MR removes the use of the `_` character in the system notes to prevent Markdown confusion. See a full discussion in #1160. ### Are there points in the code the reviewer needs to double check? To preserve backwards compatibility with existing system notes, there is a SQL wildcard match for notes having underscores. This seemed safer than migrating all notes. ### Why was this MR needed? In an ideal world, the Markdown parser would be able to handle references containing underscores with or without escape sequences. However, there are a number of issues: 1. RedCarpet's parser for emphasis block is pretty dumb: it treats `#` as a word break and thus even the `intra_word_emphasis` flag has no effect. 2. The parser is in C and can't be changed easily. 3. There is no way to insert an escape sequence for emphasis blocks. The only way around this is to switch to something like CommonMark, which does support escape sequences. ### What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)? Issue #1160 ### Screenshots Before: ![Screen_Shot_2015-03-19_at_1.39.29_AM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/a1db4b96c0df2f10d9855ed5abe976ca/Screen_Shot_2015-03-19_at_1.39.29_AM.png) After: ![Screen_Shot_2015-03-19_at_1.39.35_AM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/189a062c2d19645eec1782ac1f0d4f2f/Screen_Shot_2015-03-19_at_1.39.35_AM.png) See merge request !385
| * Fix cross references when usernames, milestones, or project names contain ↵Stan Hu2015-03-191-1/+1
| | | | | | | | | | | | underscores. Remove emphasis from system notes to avoid Markdown conflicts in names.
* | Fewer constants, more helpers.Douwe Maan2015-03-191-1/+1
|/
* Fix condensed range in MR push comment.Douwe Maan2015-03-181-1/+1
|
* Merge branch 'issue_subscription' into 'master'Dmitriy Zaporozhets2015-03-171-0/+29
|\ | | | | | | | | | | | | | | | | | | | | | | Subscription to issue/mr Fixes #1911 and #1909 ![joxi_screenshot_1426601822159](https://dev.gitlab.org/gitlab/gitlabhq/uploads/53021bc5783271322ab2dfba7598eaa3/joxi_screenshot_1426601822159.png) ![joxi_screenshot_1426601836423](https://dev.gitlab.org/gitlab/gitlabhq/uploads/244ff360fbd6f30980f8dad699400814/joxi_screenshot_1426601836423.png) See merge request !1702
| * testsValery Sizov2015-03-161-1/+3
| |
| * fix specsValery Sizov2015-03-161-10/+19
| |
| * rename table subscribe; make it polymorficValery Sizov2015-03-161-5/+5
| |
| * code folding fixValery Sizov2015-03-161-5/+5
| |
| * SubscriptionValery Sizov2015-03-151-0/+18
| |
* | Merge branch 'fix-restricted-visibility' into 'master'Dmitriy Zaporozhets2015-03-165-7/+68
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restricted visibility levels - bug fix and new feature This allows admin users to override restricted visibility settings when creating and updating projects and snippets, and moves the restricted visibility configuration from gitlab.yml to the web UI. See #1903. ## Move configuration location I added a new section to the application settings page for restricted visibility levels. Each level has a checkbox, styled with Bootstrap to look like a toggle button. A checked box means that the level is restricted. I added a glowing text shadow and changed the background color for checked buttons because the default styles made it hard to distinguish between checked and unchecked. This image shows the new section with the "Public" box checked: ![restricted_visibility_settings](https://dev.gitlab.org/Okada/gitlabhq/uploads/629562e4313f89b795e81c3bb0f95893/restricted_visibility_settings.png) ## Allow admins to override To allow admin users to override the restricted visibility levels, I had to remove the `visibility_level` validation from the `Project` class. The model doesn't know about the `current_user`, which should determine whether the restrictions can be overridden. We could use the creator in the validation, but that wouldn't work correctly for projects where a non-admin user is the creator and an admin tries to change the project to a restricted visibility level. The `Project::UpdateService` and `Project::CreateService` classes already had code to determine whether the current user is allowed to use a given visibility level; now all visibility level validation is done in those classes. Currently, when a non-admin tries to create or update a project using a restricted level, these classes silently set the visibility level to the global default (create) or the project's existing value (update). I changed this behavior to be more like an Active Model validation, where using a restricted level causes the entire request to be rejected. Project and personal snippets didn't have service classes, and restricted visibility levels weren't being enforced in the model or the controllers. The UI disabled radio buttons for restricted levels, but that wouldn't be difficult to circumvent. I created the `CreateSnippetService` and `UpdateSnippetService` classes to do the same restricted visibility check that the project classes do. And since I was dealing with snippet visibility levels, I updated the API endpoints for project snippets to allow users to set and update the visibility level. ## TODO * [x] Add more tests for restricted visibility functionality cc @sytse @dzaporozhets See merge request !1655
| * \ Merge branch 'master' into fix-restricted-visibilityVinnie Okada2015-03-1410-54/+92
| |\ \ | | | | | | | | | | | | | | | | Conflicts: db/schema.rb
| * | | Enforce restricted visibilities for snippetsVinnie Okada2015-03-086-23/+40
| | | | | | | | | | | | | | | | | | | | | | | | Add new service classes to create and update project and personal snippets. These classes are responsible for enforcing restricted visibility settings for non-admin users.
| * | | Allow admins to override restricted visibilityVinnie Okada2015-03-083-7/+33
| | | | | | | | | | | | | | | | | | | | Allow admins to use restricted visibility levels when creating or updating projects.
| * | | Move restricted visibility settings to the UIVinnie Okada2015-03-072-4/+22
| | | | | | | | | | | | | | | | | | | | Add checkboxes to the application settings page for restricted visibility levels, and remove those settings from gitlab.yml.
* | | | Use `member` instead of `tm`.Douwe Maan2015-03-151-12/+12
| | | |
* | | | Use `project_member` instead of `team_member`.Douwe Maan2015-03-152-8/+8
| | | |
* | | | Use `group_member` instead of `users_group` or `membership`.Douwe Maan2015-03-151-5/+5
| |/ / |/| |
* | | Move tag deletion to service and execute hooks and services.Douwe Maan2015-03-131-0/+42
| | |
* | | Ecevute hooks and services when branches are created/deleted through web.Douwe Maan2015-03-132-0/+5
| | |
* | | More consistent method naming.Douwe Maan2015-03-132-5/+8
| | |
* | | Use PushDataBuilder where applicable.Douwe Maan2015-03-134-27/+22
| | |
* | | Set push data object kind in PushDataBuilder.Douwe Maan2015-03-132-6/+2
| |/ |/|
* | Merge branch 'generate-valid-json' into 'master'Hannes Rosenögger2015-03-111-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | Generate valid json This patch helps to be compatible to other programing languages as it improves the validation of hook data. It seems only ruby can handle 'nil' as value while other json decode function will fatal. See merge request !182
| * | Generate valid json for hooksNicole Cordes2015-03-101-1/+1
| | | | | | | | | | | | | | | It seems that ruby can handle 'nil' value but other json processors (like PHP) throw an error. This is always generated for empty arrays.
* | | Use Gitlab::Git helper methods and constants as much as possible.Douwe Maan2015-03-104-19/+13
|/ /
* | Blocking user does not remove him/her from project/groups but show blocked labelDmitriy Zaporozhets2015-03-091-0/+1
| |
* | fix mass SQL statements on initial pushHannes Rosenögger2015-03-091-1/+3
|/ | | | | | | This commit disables process_commit_messages() for the initial push to the default branch. This fixes the mass SQL statements (~500000) that were executed during the initial push of the linux kernel for example.
* Merge branch 'mass-change-comments' into 'master'Dmitriy Zaporozhets2015-03-071-25/+10
|\ | | | | | | | | | | | | | | Send notifications and leave system comments when bulk updating issues. Resolves https://dev.gitlab.org/gitlab/gitlabhq/issues/1885. See merge request !1646
| * Send notifications and leave system comments when bulk updating issues.Douwe Maan2015-03-061-25/+10
| |
* | Merge branch 'condensed-mr-commits' into 'master'Dmitriy Zaporozhets2015-03-071-1/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Condense commits already in target branch when updating merge request source branch. Resolves https://dev.gitlab.org/gitlab/gitlabhq/issues/2043. ![Screen_Shot_2015-03-06_at_17.17.13](https://dev.gitlab.org/gitlab/gitlabhq/uploads/8d03540b7b7294ce07005e6f3db6ed3d/Screen_Shot_2015-03-06_at_17.17.13.png) (Not shown in screenshot, but works fine with rebases as well) See merge request !1648
| * | Condense commits already in target branch when updating merge request source ↵Douwe Maan2015-03-061-1/+7
| |/ | | | | | | branch.
* | Added comment notification events to HipChat and Slack services.Stan Hu2015-03-061-0/+12
|/ | | | | | | | | Supports four different event types all bundled under the "note" event type: - comments on a commit - comments on an issue - comments on a merge request - comments on a code snippet
* Set correct object_kind on tag push data.Douwe Maan2015-03-032-3/+6
|
* Execute tag_push services and hooks when tag is created through web UI.Douwe Maan2015-03-031-5/+5
|
* Don't execute GitlabCiService twice for pushed tags.Douwe Maan2015-03-031-4/+0
|
* Execute services for tag push.Douwe Maan2015-03-031-0/+1
|
* Issue #595: Support Slack notifications upon issue and merge request eventsStan Hu2015-03-033-9/+21
| | | | | | | | | | | 1) Adds a DB migration for all services to toggle on push, issue, and merge events. 2) Upon an issue or merge request event, fire service hooks. 3) Slack service supports custom messages for each of these events. Other services not supported at the moment. 4) Label merge request hooks with their corresponding actions.
* Merge branch 'autocomplete-mention-count' into 'master'Dmitriy Zaporozhets2015-02-271-3/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include number of affected people in all/group mention autocomplete item. As mentioned in #2054. To minimize misuse of all/group mentions, the autocomplete title includes the number of members this mention will notify, so users will be more considerate what groups they mention. Example: at-all "**all** All Project and Group Members (12)" at-gitlab "**gitlab** GitLab (12)" See merge request !1596
| * Include number of affected people in all/group mention autocomplete item.Douwe Maan2015-02-251-3/+9
| |
* | Merge branch 'master' into extend_markdown_uploadDouwe Maan2015-02-252-2/+4
|\ \ | |/ | | | | | | # Conflicts: # app/controllers/files_controller.rb
| * Web Editor: save to new branchValery Sizov2015-02-242-2/+4
| |
* | Merge branch 'master' into extend_markdown_uploadDouwe Maan2015-02-244-12/+23
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | # Conflicts: # app/views/projects/issues/_form.html.haml # app/views/projects/merge_requests/_form.html.haml # app/views/projects/merge_requests/_new_submit.html.haml # app/views/projects/milestones/_form.html.haml # app/views/projects/notes/_form.html.haml # app/views/projects/wikis/_form.html.haml # config/routes.rb # spec/controllers/projects_controller_spec.rb
| * Merge pull request #8180 from Bugagazavr/mr_updateDmitriy Zaporozhets2015-02-231-3/+9
| |\ | | | | | | Trigger merge request hook when source updated
| | * Trigger merge request hook when source updatedKirill Zaitsev2014-12-091-3/+9
| | |
| * | Improve error messages when file editing failsVinnie Okada2015-02-222-8/+13
| | | | | | | | | | | | | | | Give more specific errors in API responses and web UI flash messages when a file update fails.
| * | Merge branch 'master' into rails-4.1.9Vinnie Okada2015-02-211-3/+9
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: app/views/projects/commits/_commit.html.haml app/views/projects/issues/_issue.html.haml app/views/projects/issues/_issue_context.html.haml app/views/projects/merge_requests/_merge_request.html.haml app/views/projects/merge_requests/show/_context.html.haml
| * \ \ Merge branch 'master' into rails-4.1.9Vinnie Okada2015-02-197-46/+66
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: app/views/dashboard/_project.html.haml app/views/events/event/_common.html.haml app/views/explore/projects/_project.html.haml app/views/groups/_projects.html.haml app/views/projects/_home_panel.html.haml app/views/projects/_issues_nav.html.haml app/views/projects/issues/_discussion.html.haml app/views/projects/issues/_issues.html.haml app/views/projects/issues/show.html.haml app/views/projects/merge_requests/_discussion.html.haml app/views/projects/merge_requests/_show.html.haml app/views/projects/milestones/index.html.haml app/views/projects/notes/_edit_form.html.haml app/views/shared/_issuable_filter.html.haml