Commit Graph
2289 Commits
Author SHA1 Message Date
Douwe Maan e9e79fdfdf Merge branch 'fix-escaped-branches-in-compare' into 'master'
Unescape branch names in compare commit

The upgrade in GitLab v7.9 to Rails v4.1.9 caused all branch names in the compare commit mode to be escaped (e.g. `/` to `%2F`). The compare mode would not always work when comparing against branch names with a forward slash.

Opted to unescape the branch name rather than use a wildcard segment to prevent escaping slashes because it seems like a more sensible URL. The slashes in this case aren't really represented by a tree structure (e.g. /compare/one/two/branch..another/branch/here).

* Closes #1399
* Closes https://github.com/gitlabhq/gitlabhq/issues/9105

See merge request !582
2015-05-04 06:58:56 +00:00
Stan Hu a3157626f1 Re-annotate models 2015-05-03 13:38:27 -07:00
Dmitriy Zaporozhets 747232eeda Merge branch 'api-iid' of https://github.com/jubianchi/gitlabhq into jubianchi-api-iid 2015-05-03 14:34:23 +03:00
Dmitriy Zaporozhets a7ddff8748 Merge pull request #9066 from jirutka/fix-6417
Fix #6417: users with group permission should be able to create groups via API
2015-05-03 14:31:00 +03:00
Dmitriy Zaporozhets e097812f57 Merge pull request #9234 from dsander/group-milestones-by-title
Group milestones by title in the dashboard and all other issue views
2015-05-03 14:29:31 +03:00
Dmitriy Zaporozhets 644b4c97e9 Merge pull request #8756 from zaburt/force_utf8_on_oauth_properties
add common method to force utf8 and force oauth properties to be utf8
2015-05-03 14:25:36 +03:00
Dmitriy Zaporozhets 0df317f729 Merge branch 'restrict-signups-to-domains' into 'master'
Add application setting to restrict user signups to e-mail domains

This feature was requested long ago:

http://feedback.gitlab.com/forums/176466-general/suggestions/4118466-ability-to-register-only-from-ceratain-domains

This MR is based off !253 but changed to use application settings and use wildcard strings
to give more flexibility in pattern matching. Regexps seemed overkill and prone to mistakes.

Also note that validation is ONLY done on creation to prevent breaking existing users who do not have a whitelisted domain. However, this allows a user to sign-up and change his/her email to a non-whitelisted domain.

Screenshots:

![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b312046aae03971f37f4247382971fc6/image.png)

![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/94bdf3ffaf37c2e8324eff83308f81f0/image.png)

See merge request !598
2015-05-03 10:02:45 +00:00
Onur Küçük 0ae574007d add common method to force utf8 and force oauth properties to be utf8 2015-05-03 00:43:46 +03:00
Robert Speicher b3890749c0 Merge branch 'rs-test-env-fixes' into 'master'
Don't delete gitlab-test-fork folder after every test run

72a7febead added a forked repository cloned to `tmp/tests/gitlab-test-fork` but because it wasn't added to the list of folders not to delete every run, it was being cloned every run and adding extraneous console output.

See merge request !600
2015-05-02 20:32:46 +00:00
Robert Speicher 1c49809bf8 Don't delete gitlab-test-fork folder after every test run 2015-05-02 16:01:33 -04:00
Robert Speicher 703856c75e Merge branch 'make-reply-to-work-everywhere' into 'master'
Make Reply-To config apply to change e-mail confirmation and other notifications sent through Devise

Notifications sent through Devise were using the default From: address, and due to a broken test line nothing was actually being run.

The only way to customize the Devise Reply-To field is to use a custom mailer. Moved the e-mail configuration out of the initializers to accommodate this.

Closes #1556

See merge request !596
2015-05-02 17:48:30 +00:00
Stan Hu eb4f1eb5f5 Add application setting to restrict user signups to e-mail domains
This feature was requested long ago:

http://feedback.gitlab.com/forums/176466-general/suggestions/4118466-ability-to-register-only-from-ceratain-domains

This MR is based off !253 but changed to use application settings and use wildcard strings
to give more flexibility in pattern matching. Regexps seemed overkill and easy to get wrong.

Only restrict e-mail addresses upon creation
2015-05-02 09:36:52 -07:00
jubianchi 2c544d43c8 Query issues, merge requests and milestones with their IID through API 2015-05-02 10:44:52 +02:00
Stan Hu 4dda17a5bf Make Reply-To config apply to change e-mail confirmation and other notifications
sent through Devise

Fix test case that was passing due to a broken `around` statement.

Closes #1556
2015-05-01 22:57:10 -07:00
Robert Speicher 99fcf2e6fe Improve/add specs for Project#get_issue and #issue_exists? 2015-05-01 13:29:36 -04:00
Dominik Sander e6ee8d0ebe Group milestones by title in the dashboard and all other issue views
This groups milestones by title for issue views like it has been done for
the milestone dashboard/project overview. Before milestones with the
same title would show up multiple times in the filter dropdown and one could
only filter per project and milestone. Now the milestone filter is based
on the title of the milestone, i.e. all issues marked with the same
milestone title are shown.
2015-05-01 01:12:58 +02:00
Robert Speicher 84a7675ea6 Remove title_for_issue helper 2015-04-30 17:27:33 -04:00
Robert Speicher 242bebc134 Remove special handling for the ' problem
While `escape_once` will create this HTML entity, Nokogiri always
translates it back before it gets to IssueReferenceFilter, so there
should be no danger of erroneous issue links.
2015-04-30 16:35:27 -04:00
Robert Speicher 0027c2ddd7 Add Project#get_issue 2015-04-30 16:35:27 -04:00
Robert Speicher cd3c24a8f3 Autolink short URLs 2015-04-30 16:35:27 -04:00
Robert Speicher f4fac3ac87 Add jira_project project factory 2015-04-30 16:35:27 -04:00
Robert Speicher fad015764c More gitlab_markdown_helper_spec cleanup 2015-04-30 16:35:26 -04:00
Robert Speicher e46d1cdd8b Add Gitlab::Markdown::SanitizationFilter
This just extends the HTML::Pipeline::SanitizationFilter with our custom
whitelist.
2015-04-30 16:35:25 -04:00
Robert Speicher aa2cc670fe Add Gitlab::Markdown::AutolinkFilter 2015-04-30 16:35:25 -04:00
Robert Speicher 382a0aa6ef Add Gitlab::Markdown::TableOfContentsFilter
Removes header and table of contents processing from Redcarpet renderer.
2015-04-30 16:35:25 -04:00
Robert Speicher 286c9e6886 Add a feature spec for our entire Markdown parsing stack 2015-04-30 16:35:25 -04:00
Stan Hu ee92dd1683 Unescape branch names in compare commit
Closes #1399
Closes https://github.com/gitlabhq/gitlabhq/issues/9105
2015-04-30 12:44:46 -07:00
Douwe Maan f2cf6d75ec Merge branch 'show-invalid-projects-google-code-import' into 'master'
Show incompatible projects in Google Code import status

Using Google Code import with a JSON file that contained only one Subversion project led to confusion
over whether the system was working. Display the list of valid projects if there are any, and show a list of incompatible projects. Provide tips on how to retain issue data after conversion.

Closes #1531

## Screenshots

Before:

![Screen_Shot_2015-04-29_at_12.46.41_AM](https://gitlab.com/stanhu/gitlab-ce/uploads/16ea5a99cbace48cd2f2c238b5f73f4e/Screen_Shot_2015-04-29_at_12.46.41_AM.png)

After with no projects available (notice the button is hidden):

![Screen_Shot_2015-04-30_at_1.34.38_AM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/43c612cdcbab181713e5764e2f38a04e/Screen_Shot_2015-04-30_at_1.34.38_AM.png)

After with 1 valid and 1 incompatible project:

![Screen_Shot_2015-04-30_at_1.37.26_AM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b5bcbd304206a996932e5208ef54a071/Screen_Shot_2015-04-30_at_1.37.26_AM.png)

See merge request !586
2015-04-30 17:08:45 +00:00
Dmitriy Zaporozhets 6d22e96744 Merge branch 'fix-submodule-error-with-forked-project' into 'master'
Fix "Revspec not found" errors when viewing diffs in a forked project with submodules

## What does this MR do?

This MR fixes an error that occurs when viewing diffs in a forked project with submodules.

### Are there points in the code the reviewer needs to double check?

Testing this code was tricky. The only way this problem shows up is if the origin project does NOT have the submodule update commit. The introduction of gitlab-test-fork serves that purpose: it contains a submodule update not present in gitlab-test.

### Why was this MR needed?

A user would receive a 500 error when trying to view a merge request with a submodule update. #1413 has details on how to reproduce this issue.

### What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)?

#1413

See merge request !512
2015-04-30 16:47:35 +00:00
Stan Hu 9c76a6fa96 Show incompatible projects in Google Code import status
Importing a JSON file with only one Subversion project lead to confusion
over whether the system was working. Provide status why these projects
could not be imported directly.

Closes #1531
2015-04-30 06:56:49 -07:00
Douwe Maan 7e0eb486ed Don't allow a merge request to be merged when its title starts with "WIP". 2015-04-30 15:46:36 +02:00
Douwe Maan 822ba95f75 Merge branch 'fix-commit-data-url-generation' into 'master'
Fix bug where commit data would not appear in some subdirectories

Fix issue where commit data would not show up in some subdirectories due to escaped slashes. For example:

https://gitlab.common-lisp.net/ecl/ecl/tree/develop/src/gc (now patched with fix)

The upgrade from Rails v4.1.2 to v4.1.9 (76aad9b76e) caused slashes in a tree to be escaped automatically. Using a wildcard glob in the route prevents this behavior.

* Closes #1478, #1459
* Closes https://github.com/gitlabhq/gitlabhq/issues/9037

See merge request !581
2015-04-28 15:46:36 +00:00
Dmitriy Zaporozhets 8140c68289 Merge branch 'rs-issue-2269' into 'master'
Remove duplicate settings for default_url_options

Closes #2269

See merge request !1797
2015-04-28 08:34:34 +00:00
Dmitriy Zaporozhets f0227d761f Merge branch 'master' of github.com:gitlabhq/gitlabhq 2015-04-28 11:32:37 +03:00
Stan Hu 72a7febead Fix "Revspec not found" errors when viewing diffs in a forked project with submodules
Closes #1413
2015-04-27 20:42:38 -07:00
Robert Speicher e3d2304d69 Specs don't need to set default_url_options anymore 2015-04-27 15:47:05 -04:00
Jeroen van Baarsen fbb5a359fe Merge pull request #8754 from jirutka/fix-project_name_regex
Fix (project_)name_regex to accept non-ASCII letters and dash
2015-04-27 17:48:14 +02:00
Jakub Jirutka a1c01bc19b Fix (project_)name_regex to accept non-ASCII letters and dash 2015-04-27 16:38:47 +02:00
Dmitriy Zaporozhets 9f443f4257 Merge branch 'fix-relative-submodule-links-with-personal-projects' into 'master'
Fix broken file browsing with relative submodule in personal projects

Git submodules with relative links work fine for projects in groups but not in personal projects. This patch fixes this issue.

To reproduce the problem, go here:

https://gitlab.com/andrewwu.tw/submodule-test/tree/master

Closes https://github.com/gitlabhq/gitlabhq/issues/7554

See merge request !565
2015-04-27 14:23:01 +00:00
Valery Sizov bc9ba5237c Revert "Added X-GitLab-Event header for web hooks"
This reverts commit 548f182814.
2015-04-27 16:29:31 +03:00
Dmitriy Zaporozhets 278c3ba401 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-04-27 11:38:36 +03:00
Dmitriy Zaporozhets 2cbdfbfd1e Merge branch 'master' of github.com:gitlabhq/gitlabhq 2015-04-27 11:38:29 +03:00
Dmitriy Zaporozhets 38e2ae5ae0 Merge pull request #8644 from Bugagazavr/hook-events
Add X-GitLab-Event header for web hooks
2015-04-27 11:22:33 +03:00
Dmitriy Zaporozhets f3ffd7d0b1 Merge branch 'rs-capybara-screenshot' into 'master'
Add capybara-screenshot gem

This is a handy little gem that automatically saves the page and a screenshot when a Capybara test fails to `tmp/capybara/` so you can easily see why it might have failed without adding your own `save_and_open_page` directive in the code.

Also reduces the timeout for Capybara tests when not in a CI environment.

See merge request !578
2015-04-27 07:43:45 +00:00
Dmitriy Zaporozhets 57759c9aee Merge branch 'forked-event' into 'master'
Use Projects::CreateService to fork projects so that after-create hooks are run.

Makes for cleaner code and less duplication, and causes the "User created project Namespace / Project" event to be posted and system hooks to be run.

See merge request !575
2015-04-27 07:41:20 +00:00
Stan Hu ef0055b52d Fix bug where commit data would not appear in some subdirectories
The upgrade from Rails v4.1.2 to v4.1.9 (76aad9b76e) caused slashes in a tree to be escaped automatically.
Using wildcard globs prevents this behavior.

Closes #1478, #1459
2015-04-26 23:52:40 -07:00
Dominik Sander 3c3b43b0a0 Add notify and color options to HipchatService
When notify is set to true send messages will trigger a notification for
all room members.
Color changes the background color of the message.
2015-04-26 22:00:51 +02:00
Vinnie Okada bd557e4b64 Add new admin settings
Add new global application settings for default project and snippet
visibility levels.
2015-04-26 07:48:19 -06:00
Robert Speicher 652c15b585 Don't use capybara-screenshot in CI environments 2015-04-25 21:33:17 -04:00
Robert Speicher 3875930793 Enable js_errors for Capybara in Spinach and RSpec 2015-04-25 21:33:16 -04:00