Commit Graph
1665 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets b8ad3647ad Merge branch 'fix-nested-tasks' into 'master'
Fix nested task lists

When nesting task list items, the parent item is wrapped in a `<p>` tag.  Update the task list parser to handle these paragraph wrappers.

cc @sytse

See merge request !413
2015-03-24 20:57:35 +00:00
Dmitriy Zaporozhets 88a15b4e78 Merge branch 'merge-status-without-timestamps' into 'master'
Don't mark merge request as updated when merge status relative to target branch changes.

Addresses https://gitlab.com/gitlab-org/gitlab-ce/issues/1254 and private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2165.

See merge request !431
2015-03-24 00:11:19 +00:00
Dmitriy Zaporozhets 2bb4ea8542 Merge branch 'notes-count-without-system' into 'master'
Don't include system notes in issue/MR comment count.

Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2163.

See merge request !430
2015-03-24 00:10:25 +00:00
Dmitriy Zaporozhets 2953e0d19b Merge branch 'emailsonpush-create-delete' into 'master'
Send EmailsOnPush email when branch or tag is created or deleted.

Addresses #1951, #1957 and #1925.

![Screen_Shot_2015-03-17_at_13.58.15](https://dev.gitlab.org/gitlab/gitlabhq/uploads/16ff25adb4b4a7e1923612e0652442b4/Screen_Shot_2015-03-17_at_13.58.15.png)

![Screen_Shot_2015-03-17_at_13.58.22](https://dev.gitlab.org/gitlab/gitlabhq/uploads/e346c1d84aba3a093b722d0a4167e289/Screen_Shot_2015-03-17_at_13.58.22.png)

![Screen_Shot_2015-03-17_at_13.58.28](https://dev.gitlab.org/gitlab/gitlabhq/uploads/720437ecc13f317c6d20eff82ac60bd7/Screen_Shot_2015-03-17_at_13.58.28.png)

![Screen_Shot_2015-03-17_at_13.58.34](https://dev.gitlab.org/gitlab/gitlabhq/uploads/2b302bb6cdbe27c96a8dff1375236602/Screen_Shot_2015-03-17_at_13.58.34.png)

See merge request !1709
2015-03-23 16:48:27 +00:00
Dmitriy Zaporozhets e24da35984 Merge branch 'improve-contributions-calendar' into 'master'
Replace commits calendar with contributions calendar

* count opening of issues and merge requests
* dont trigger git repository - use events from database
* count pushes instead of commits for faster and easier counting
* much-much faster since does not affected by repository size

See merge request !420
2015-03-23 16:40:55 +00:00
Douwe Maan 70fa9d5629 Don't mark merge request as updated when merge status relative to target branch changes. 2015-03-23 17:30:19 +01:00
Douwe Maan 6b92236eeb Don't include system notes in issue/MR comment count. 2015-03-23 16:43:08 +01:00
Douwe Maan b13bed62ea Clean up code by using keyword arguments. 2015-03-23 15:08:19 +01:00
Dmitriy Zaporozhets 43afe46bbd Refactor contributions events and write tests for calendar 2015-03-22 13:55:00 -07:00
Dmitriy Zaporozhets 64891c6c40 Replace commits calendar with contributions calendar
* count opening of issues and merge requests
* dont trigger git repository - use events from database
* much-much faster since does not affected by repository size
2015-03-21 23:48:08 -07:00
Stan Hu 59d5c77975 Fix dots in Wiki slug causing errors
Closes #1263, #431
2015-03-21 18:33:51 -07:00
Dmitriy Zaporozhets d96098e966 Cache head commit and head tree 2015-03-21 13:45:08 -07:00
Dmitriy Zaporozhets c378d20c84 Cache lookup results into hash to prevent repeating same requests to git repo 2015-03-21 13:44:51 -07:00
Dmitriy Zaporozhets 2c796a1785 Cache project branches and tags into variables 2015-03-21 13:44:11 -07:00
Vinnie Okada 1dc90fc455 Fix nested task lists
When nesting task list items, the parent item is wrapped in a `<p>` tag.
Update the task list parser to handle these paragraph wrappers.
2015-03-21 08:45:28 -06:00
Dmitriy Zaporozhets 5738afdb12 Merge branch 'link_to_ci_with_ref' into 'master'
Link to CI with ref

gitlab/gitlab-ci#162

!!! Should be merged simultaneously with https://dev.gitlab.org/gitlab/gitlab-ci/merge_requests/129

See merge request !1638
2015-03-20 22:42:32 +00:00
Dmitriy Zaporozhets 65b392c394 Merge branch 'merge-status-transition' into 'master'
Update merge_status state to allow more transitions

Previously you could only transition from the unchecked state to one of the others. This meant that the mark_as_unmerged call in AutoMergeService would rarily be able to actually transition the state. As it would usually have already been set to can_be_merged before it hit that service.

Spec and Spinach tests have been run locally and all pass.

See merge request !405
2015-03-20 20:11:04 +00:00
Valery Sizov e5fe14b2fb Link to CI with ref 2015-03-20 19:19:29 +02:00
DJ Mountney 415517918e Update merge_status state to allow more transitions
Previously you could only transition from the unchecked state to one of the others. This meant that the mark_as_unmerged call in AutoMergeService would rarily be able to actually transition the state. As it would usually have already been set to can_be_merged before it hit that service.
2015-03-19 13:51:16 -07:00
Stan Hu fad71576f9 Fix cross references when usernames, milestones, or project names contain underscores.
Remove emphasis from system notes to avoid Markdown conflicts in names.
2015-03-19 07:07:30 -07:00
Dmitriy Zaporozhets 0eaabc2708 Revert "Note: add default_scope { order(created_at: :asc, id: :asc) }"
This reverts commit 7602cef572.
2015-03-18 11:42:03 -07:00
Dmitriy Zaporozhets b5e961eb4c Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-03-18 11:15:27 -07:00
Dmitriy Zaporozhets b5b2055cca Merge branch 'fix-mr-push-range' into 'master'
Fix condensed range in MR push comment.

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

In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/326#note_984907, you see that the compare page doesn't actually have 39 commits because we're using `first_new_commit^`, which is not always the same as `oldrev`. With this MR, we use `oldrev` instead, which will always work.

See merge request !1721
2015-03-18 18:15:24 +00:00
Douwe Maan 5994b036d2 Merge branch 'api-sort-merge-request-comments' into 'master'
Api: sort merge_request comments

Add default_scope { order(created_at: :asc, id: :asc) } in Note so comments are sorted when fetched through api.

See merge request !256
2015-03-18 18:08:40 +00:00
Dmitriy Zaporozhets d03d636304 Merge branch 'changelog-link' into 'master'
Add changelog, license and contribution guide links to project sidebar.

If the version is known, the "Version: 7.9.0pre" button links to the changelog, otherwise a "View changelog" button is shown.

![Screen_Shot_2015-03-18_at_14.22.29](https://dev.gitlab.org/gitlab/gitlabhq/uploads/747acc018ec9a188098e0f0bc4e91cc3/Screen_Shot_2015-03-18_at_14.22.29.png)

See merge request !1708
2015-03-18 18:02:39 +00:00
Dmitriy Zaporozhets fec5f807bb Merge branch 'new-branch-commits' into 'master'
List new commits for newly pushed branch in activity view.

When someone pushes commits, I want to see them, regardless if it's a new or existing branch. If it's a new branch, we compare with the default branch (usually master).

![Screen_Shot_2015-03-17_at_15.49.13](https://dev.gitlab.org/gitlab/gitlabhq/uploads/4cb7e0d833bc83a30197db81d4b273bc/Screen_Shot_2015-03-17_at_15.49.13.png)

See merge request !1711
2015-03-18 17:47:02 +00:00
Samuel Bernard 7602cef572 Note: add default_scope { order(created_at: :asc, id: :asc) } 2015-03-18 17:06:17 +01:00
Douwe Maan ebfc7d052b Fix condensed range in MR push comment. 2015-03-18 16:37:29 +01:00
Douwe Maan b1b8261f56 Add license and contribution guide links to project sidebar. 2015-03-18 16:17:43 +01:00
Douwe Maan 9d938fd77d List new commits for newly pushed branch in activity view. 2015-03-18 14:28:50 +01:00
Douwe Maan d328b4166e Fix tree readme. 2015-03-18 14:08:26 +01:00
Douwe Maan 6581aea3bf Link project version to changelog if there is one. 2015-03-18 14:08:26 +01:00
Douwe Maan 31e484085a Find tree readme lazily. 2015-03-18 14:08:26 +01:00
Douwe Maan 88f9ed3d19 Move finding of contributing file from tree to repository. 2015-03-18 14:08:26 +01:00
Douwe Maan bf235053ad Send EmailsOnPush email when branch or tag is created or deleted. 2015-03-18 14:07:28 +01:00
Hannes Rosenögger 9e5738b007 Extend the commit calendar to show the actual commits for a date 2015-03-18 08:42:42 +01:00
Dmitriy Zaporozhets 63d0bf1f5e Fix external wiki service 2015-03-17 22:59:45 -07:00
Dmitriy Zaporozhets 066fb568e7 Align services like in EE for easier merging 2015-03-17 19:06:43 -07:00
Dmitriy Zaporozhets 52acd2b45c Merge branch 'external_wiki' into 'master'
Add support for external wikis

## What does this MR do?
This MR adds the possibility to replace the link to the internal wiki of gitlab with a custom link.
Currently this is realised as a service.

## What Use Case does this MR solve?
In my Company we already have a wiki System (Confluence).
We have a policy to use the existing wiki, so we can't switch to the internal wiki Gitlab provides.
This currently only leaves us two choices:
1. Disable the gitlab wiki. That means we completly loose the connection between wiki and code from the gitlab ui.
2. Create a simple wiki page with a link to our external wiki and hope that no one uses the internal one.

Both solutions are not really good.
So what can be done to improve the situation while making it as easy as possible for new developers to access both, wiki and gitlab?
Replacing the wiki link kinda like the JIRA integration replaces the issues link looks like a good first step to me. :)
This can probably be extended later to completly prevent access to the internal wiki (currently that's still possible if you know the link) or maybe to check if the link really points to a wiki.

## Screenshot:
![external_wiki_service](https://gitlab.com/uploads/gitlab-org/gitlab-ce/89b27cf068/external_wiki_service.png)

See merge request !291
2015-03-18 02:00:36 +00:00
Dmitriy Zaporozhets bfc8ded120 Merge branch 'last-deploy-key' into 'master'
Delete deploy key when last connection to a project is destroyed.

Addresses #1959.

See merge request !1710
2015-03-17 16:49:38 +00:00
Dmitriy Zaporozhets 9162e34bb0 Merge branch 'issue_subscription' into 'master'
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
2015-03-17 16:45:04 +00:00
Douwe Maan 9c7fffb655 Delete deploy key when last connection to a project is destroyed. 2015-03-17 14:55:43 +01:00
Vinnie Okada 2e672c39a0 Fix restricted visibility bugs
Check for nil values in the restricted_visibility_level validation
method, and set the restricted visibility request parameter to `[]` when
it's missing from the request.
2015-03-16 13:59:50 -06:00
Valery Sizov 1b437ec349 tests 2015-03-16 21:38:41 +02:00
Dmitriy Zaporozhets 648f38cd98 Merge branch 'fix-restricted-visibility' into 'master'
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
2015-03-16 17:49:46 +00:00
Valery Sizov f53683e67f fix specs 2015-03-16 16:51:49 +02:00
Valery Sizov 410d25c8ca rename table subscribe; make it polymorfic 2015-03-16 15:22:50 +02:00
Valery Sizov 09ef69b7c8 code folding fix 2015-03-16 13:52:55 +02:00
Valery Sizov 9698b36c1c Subscription 2015-03-15 19:44:59 +02:00
Douwe Maan e97cdb042d Remove old team scopes. 2015-03-15 13:50:38 +01:00