Commit Graph

2595 Commits

Author SHA1 Message Date
Jeroen Nijhof a7047569db use gitlab not gitlabci 2015-06-09 18:30:38 +02:00
Jeroen Nijhof bf7315cb13 update fog to 1.25.0 and add multipart upload support 2015-06-09 17:56:37 +02:00
Jeroen van Baarsen 25a870a6d4 Revert "No need to check if `repository_ref` is present" 2015-06-09 15:18:15 +02:00
zenati b0de6e9ae2 An `in_namespace` scope is already present 2015-06-09 13:42:01 +02:00
zenati c418261b2b No need to check if `repository_ref` is present
There is no need to check if `repository_ref` is present as:
```
      @repository_ref = if repository_ref.present?
                          repository_ref
                        else
                          nil
                        end
```

is as same as doing:

```
@repository_ref = repository_ref
```
2015-06-08 18:01:50 +02:00
Dmitriy Zaporozhets 87f9c475db Merge branch 'refactor-web-editor' into 'master'
Refactor web editor

* fix problem with editing non-master branch
* before commit make sure branch exists
* dont allow user change file in one branch and commit to another existing branch
* remove a lot of code duplication
* remove outdated statellite errors

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Fixes #1761

See merge request !773
2015-06-05 16:14:34 +00:00
Eric Maziade 84a414fe53 Add session expiration delay configuration through UI application
settings
2015-06-05 11:50:37 -04:00
Dmitriy Zaporozhets 7bde6ae540
Fix editing files via API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-05 17:16:51 +02:00
Douwe Maan 3f59a8f0be Merge branch 'cernvcs/gitlab-ce-feature/auto_link_ldap_omniauth' 2015-06-05 13:34:25 +02:00
Douwe Maan 45e9150a51 Tweak code. 2015-06-05 12:32:01 +02:00
Dmitriy Zaporozhets b7d20f14c6 Merge branch 'maser/gitlab-ce-order-commit-comments-in-api' into 'master'
Order commit comments in API chronologically

When fetching commit comments via API, the comments were not ordered,
but just returned in the order Postgresql finds them. Now the API always
returns comments in chronological order.

Same as !628 but with CI

See merge request !768
2015-06-05 08:38:19 +00:00
Dmitriy Zaporozhets 9287865599 Merge branch 'fix-upgrader-script' into 'master'
Fix upgrader script

This is a fix for upgrader script not guessing the latest version correctly.

Upgrader now handles versions where a version part (major/minor/patch) can have multi-digit number, also ensures that the latest version is chosen from git tags by converting tag to Gitlab::VersionInfo and than selecting the latest/greatest version.

Fixes: #1476

See merge request !695
2015-06-04 16:01:13 +00:00
Dmitriy Zaporozhets b9219469f7 Merge branch 'make-namespaces-api-available-to-all-users' into 'master'
Make namespace API available to all users

### What does this MR do?

This MR makes it possible for a user to query namespaces to which he/she has access. Also, it adds documentation for the existing API.

### Why was this MR needed?

Even though the `groups` API exists, it might still be useful to have an endpoint that tells the namespace type (e.g. `user` vs. `group`), especially if a user has access to a number of different projects.

### What are the relevant issue numbers?

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

See merge request !708
2015-06-04 15:59:17 +00:00
Dmitriy Zaporozhets e063c8f3e2 Merge branch 'trigger_hooks_create_on_backup_restore' into 'master'
Trigger hooks create on backup restore

Number of users migrating from installation from source to omnibus get this issue. This can be fixed with a bash one liner but we already have a script that creates hooks in gitlab-shell. Added to gitlab🐚install task call to `bin/create-hooks`. This script is idempotent which means it will only rewrite hooks if something changed.

Fixes https://dev.gitlab.org/gitlab/gitlabhq/issues/2208, https://github.com/gitlabhq/gitlabhq/issues/9101 and for the most part https://github.com/gitlabhq/gitlabhq/issues/8161

See merge request !762
2015-06-04 14:46:24 +00:00
Dmitriy Zaporozhets fb59f04fdf Merge branch 'fix-group-remove' into 'master'
Group improvements

* remove projects before removing group
* execute all hooks/events from project destroy when group removed
* log group create/remove
* delay remove of namespace directory (to prevent NFS issues)

Inspired by !759

See merge request !761
2015-06-03 15:02:33 +00:00
Dmitriy Zaporozhets 8046b69761 Merge branch 'remove_unecessary_rake_task' into 'master'
Remove gitlab:env:check task.

Rake task that checks for git user git settings is a leftover from early days.

It is not being used by the web editor(and web editor is also being redone atm) so this rake task just causes confusion.

Adresses internal issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2362

See merge request !758
2015-06-03 14:59:38 +00:00
Marin Jankovski a1be236c87 Trigger hooks-create on gitlab backup restore. 2015-06-03 16:24:37 +02:00
Dmitriy Zaporozhets e414463d9e
Merge branch 'repo-remove'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	spec/features/projects_spec.rb
2015-06-03 16:17:36 +02:00
Marin Jankovski 7044d649a3 Add autocrlf back to installation docs, add a check for it. 2015-06-03 15:42:22 +02:00
Dmitriy Zaporozhets 7bab4817f7
Merge branch 'repo-remove' into fix-group-remove
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	spec/features/projects_spec.rb
2015-06-03 15:15:46 +02:00
Dmitriy Zaporozhets 61cfd1d273
Wrap group removal into service
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 14:07:20 +02:00
Dmitriy Zaporozhets 97ff86e07c Move repository when project is removed
Ths commit does next:

* When we remove project we move repository to path+deleted.git
* Then we schedule removal of path+deleted with sidekiq
* If repository move failed we abort project removal

This should help us with NFS issue when project get removed but
repository stayed. The full explanation of problem is below:

* rm -rf project.git
* rm -rf removes project.git/objects/foo
* NFS server renames foo to foo.nfsXXXX because some NFS client (think
* Unicorn) still has the file open
* rm -rf exits, but project.git/objects/foo.nfsXXX still exists
* Unicorn closes the file, the NFS client closes the file (foo), and the
* NFS server removes foo.nfsXXX
* the directory project.git/objects/ still exists => problem

So now we move repository and even if repository removal failed

Repository directory is moved so no bugs with project removed but
repository directory taken. User still able to create new project with
same name. From administrator perspective you can easily find stalled
repositories by searching `*+deleted.git`

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 13:05:43 +02:00
Alex Lossent dfcea8ed51 Add option to automatically link omniauth and LDAP identities
Until now, a user needed to first sign in with his LDAP identity and then manually
link his/her account with an omniauth identity from their profile.
Only when this is done can the user authenticate with the omniauth provider and at
the same time benefit from the LDAP integration (HTTPS authentication with LDAP
username/password and in EE: LDAP groups, SSH keys etc.).
This feature automates the process by looking up a corresponding LDAP person when a
user connects with omniauth for the first time and then automatically linking the LDAP
and omniauth identities (of course, like the existing allow_single_sign_on setting,
this is meant to be used with trusted omniauth providers).
The result is identical to a manual account link.

Add config initializers for other omniauth settings.
2015-06-03 11:46:20 +02:00
Marin Jankovski 5f7d6c7d74 Remove gitlab:env:check task. 2015-06-03 11:26:57 +02:00
Dmitriy Zaporozhets 79aac2c128 Merge branch 'ignore-references' into 'master'
Don't notify users mentioned in code blocks or blockquotes.

cc @rspeicher

See merge request !753
2015-06-02 18:39:18 +00:00
Robert Speicher 9e7a9c63a5 Further limit the limited whitelist for project/group descriptions 2015-06-02 13:41:12 -04:00
Robert Speicher 023dd2907b Add a `pipeline` context option for SanitizationFilter
When this option is `:description`, we use a more restrictive whitelist.
This is used for Project and Group description fields.
2015-06-02 13:04:10 -04:00
Marin Jankovski c4cb563e98 Merge pull request #8730 from drunkard/master
Specify shell while run me as git user
2015-06-02 16:19:31 +02:00
Douwe Maan 1f908dc481 Fix typo. 2015-06-02 13:21:34 +02:00
Douwe Maan 94919c7ef6 Ignore references in blockquotes. 2015-06-02 13:17:21 +02:00
Douwe Maan fe78984f20 Actually ignore references in code blocks etc. 2015-06-02 13:17:11 +02:00
Dmitriy Zaporozhets d684b11054
Remove unnecessary satellite files and add CHANGELOG item
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-02 12:07:00 +02:00
Dmitriy Zaporozhets 8ad5f08483
Remove now unnecessary satelittes logic for creating and editing file with web editor
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-02 10:56:22 +02:00
Stan Hu 85145d1d77 Disable changing of the source branch in merge request update API 2015-05-29 09:40:35 -07:00
Robert Speicher 330c25385b Update jasmine:ci task to use teaspoon 2015-05-28 18:22:33 -04:00
Stan Hu 67992b9be6 Make namespace API available to all users
Closes https://github.com/gitlabhq/gitlabhq/issues/9328
2015-05-28 11:39:12 -07:00
Dmitriy Zaporozhets 05a44dcb8b Merge branch 'user-destroy-wo-groups' into 'master'
You can not remove user if he/she is an only owner of group

To prevent loose of group data you need to transfer or remove group
first before you can remove user

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !730
2015-05-28 13:14:58 +00:00
Dmitriy Zaporozhets 499154518a
You can not remove user if he/she is an only owner of group
To prevent loose of group data you need to transfer or remove group
first before you can remove user

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-28 12:00:02 +02:00
Robert Speicher 7424d2fa5b Add ExternalLinkFilter to Markdown pipeline
Forces a `rel="nofollow"` attribute on all external links.
2015-05-27 15:39:08 -04:00
Robert Speicher 5a9c5520d9 Make use of to_reference in more specs 2015-05-26 15:49:22 -04:00
Robert Speicher 81a09bc74c Support only double quotes for multi-word label references 2015-05-26 15:49:20 -04:00
Robert Speicher b88da58cb6 Add `reference_pattern` to Referable models 2015-05-26 15:48:32 -04:00
Robert Speicher 9d032cddf5 Correct the ReferenceFilter html/pipeline/filter require 2015-05-26 15:48:31 -04:00
Dmitriy Zaporozhets 08102ad748 Merge branch 'rs-issue-1690' into 'master'
Better handle label references that aren't actually references

Fixes #1690

See merge request !705
2015-05-26 14:35:54 +00:00
Douwe Maan 9bb00cd77f Merge branch 'get-monkey-off-my-rack-attack' into 'master'
Remove Rack Attack monkey patches and bump to version 4.3.0

I finally got these monkey patches into Rack Attack v4.3.0, so GitLab no longer needs them. Hooray!

See: https://github.com/kickstarter/rack-attack/pull/128

See merge request !693
2015-05-26 07:43:57 +00:00
Robert Speicher b263a33c80 Better handle label references that aren't actually references
Fixes #1690
2015-05-25 16:06:34 -04:00
Martins Polakovs cfc9bff45e Fix upgrader script 2015-05-23 13:11:23 +03:00
Stan Hu 3b22cfe600 Remove Rack Attack monkey patches and bump to version 4.3.0 2015-05-22 16:25:03 -04:00
Stan Hu deeff56967 Add support for Webhook note events
Closes https://github.com/gitlabhq/gitlabhq/issues/6745
2015-05-21 23:48:16 -04:00
Robert Speicher 212fe14c65 Customize the sanitization whitelist only once
Fixes #1651
2015-05-20 21:16:11 -04:00
Robert Speicher 8ee382087d Subclass TaskList::Filter to fix a bug
Instead of using a fork, we subclass the filter and only apply the
`task-list` class to list items that actually are task lists.

Closes #1645

See https://github.com/github/task_list/pull/60
2015-05-20 12:08:33 -04:00
Marin Jankovski 509a32f466 Merge branch 'shell-secret-path' of https://github.com/jirutka/gitlabhq into jirutka-shell-secret-path 2015-05-19 14:37:35 +02:00
Jakub Jirutka b0659c1b07 Simplify and unify helpers for rendering markup 2015-05-18 22:52:13 +02:00
Jakub Jirutka daa0925016 Rename MarkdownHelper to MarkupHelper 2015-05-18 22:51:56 +02:00
Jakub Jirutka 8dbc4746fe Handle AsciiDoc better, reuse HTML pipeline filters (fixes #9263) 2015-05-18 20:48:03 +02:00
Nikita Verkhovin 241f5971ba Add search issues/MR by number 2015-05-18 13:09:13 +06:00
Jakub Jirutka ed3298fc01 Allow to configure gitlab_shell_secret location 2015-05-16 21:46:06 +02:00
Fotis Gimian d74673fd43 Ensure that the first added admin performs repository imports 2015-05-15 13:01:10 +02:00
Dmitriy Zaporozhets 9c6f4a2351 Merge branch 'dashboard-references' into 'master'
Fix reference links in dashboard activity and ATOM feeds.

References like `@user` were not linked on the dashboard activity feed and in Atom feeds, because the reference parser depends on `@project` which isn't set in those situations.

This MR passes the project in question to the reference parsers in an option.

cc @rspeicher

See merge request !653
2015-05-15 09:59:26 +00:00
Dmitriy Zaporozhets 740dc41250 Merge branch 'project_api_order' into 'master'
Add order option for projects API

https://dev.gitlab.org/gitlab/gitlab-ci/issues/222

See merge request !656
2015-05-14 20:25:39 +00:00
Dmitriy Zaporozhets 947231a461 Merge branch 'rs-relative-link-filter' into 'master'
Minor RelativeLinkFilter cleanup

See merge request !649
2015-05-14 14:37:43 +00:00
Dmitriy Zaporozhets c2ee828c19 Merge branch 'omniauth-csrf' into 'master'
Protect OmniAuth request phase against CSRF.

Addresses #2268.

See merge request !1793
2015-05-14 14:22:26 +00:00
Valery Sizov 7c3ca86370 Add order option for projects API 2015-05-14 15:49:09 +03:00
Douwe Maan cd52cef1c0 Fix reference links in dashboard activity and ATOM feeds. 2015-05-14 13:05:33 +02:00
Robert Speicher 7f2fb72a0a Minor RelativeLinkFilter cleanup 2015-05-13 14:08:37 -04:00
Jacob Vosmaer c291ff9c6f Use SIGKILL by default in Sidekiq::MemoryKiller
This makes the memory growth-triggered Sidekiq restarts more reliable by
reducing the chance that Sidekiq ends up in a state where it is not
accepting new jobs but also not shutting down: SIGKILL is more likely to
work than SIGTERM.
2015-05-13 17:09:12 +02:00
Dmitriy Zaporozhets 8ad91d5840 Merge branch 'text-batch-1' into 'master'
Batch 1 of text improvements

Batch 1 of changes from my effort at !635 to walk through every piece of text in GitLab and see if it can be improved.

This batch includes:

- Improve text on error pages.
- Improve Git access error messages.
- Improve description of branch protection levels.
- Improve OAuth signup error message.
- Improve OAuth application flash messages.

cc @rspeicher

See merge request !642
2015-05-13 12:05:17 +00:00
Dmitriy Zaporozhets 63403019d2 Merge branch 'master' of github.com:gitlabhq/gitlabhq 2015-05-13 14:26:39 +03:00
Dmitriy Zaporozhets f32a045ef4 Merge branch 'version-check' into 'master'
Version check

See merge request !1509
2015-05-13 11:17:16 +00:00
Dmitriy Zaporozhets 740716afd1 Merge pull request #9276 from jirutka/relative_link_filter
Extract handling of relative file links to its own HTML filter
2015-05-13 14:09:57 +03:00
Douwe Maan c5e4b443ff Fix GitAccess. 2015-05-13 09:46:22 +02:00
Douwe Maan 17a41547a0 Improve OAuth signup error message. 2015-05-13 09:41:56 +02:00
Douwe Maan 9eb45ccd55 Improve description of branch protection levels. 2015-05-13 09:41:55 +02:00
Douwe Maan 1f72c387c9 Improve Git access error messages. 2015-05-13 09:41:55 +02:00
Dmitriy Zaporozhets 8b9e3af8bf Merge branch 'ad-block_auto_created_users' into 'master'
Don't accidentally unblock auto created users from Active Directory.

Fixes #1581.

See merge request !638
2015-05-12 13:28:33 +00:00
Dmitriy Zaporozhets ff13fb0ab5 Merge branch 'brakeman-level'
Conflicts:
	lib/tasks/brakeman.rake
2015-05-12 13:21:11 +03:00
Douwe Maan 125cb9b866 Don't accidentally unblock auto created users from Active Directory. 2015-05-12 11:26:43 +02:00
Jakub Jirutka b3276661f7 RelativeLinkFilter: refactor according to suggestions by @tsigo 2015-05-11 20:43:18 +02:00
Jacob Vosmaer cae978a9e8 We would like to pass 'brakeman -w2' 2015-05-11 18:11:09 +02:00
Dmitriy Zaporozhets b3f5c679b6
Replace host with real one
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-11 18:21:45 +03:00
Jacob Vosmaer 0a47d8f3f4 Follow shell command guidelines in Brakeman task
There is no real issue here because the shell command is completely
static, but it is still nicer to just follow the guidelines in
doc/development/shell_commands.md .
2015-05-11 11:11:03 +02:00
Jakub Jirutka f7adac87fe Extract handling of relative file links to RelativeLinkFilter 2015-05-11 02:07:26 +02:00
Robert Speicher 70bbf093aa Remove class and id attributes from SanitizationFilter whitelist 2015-05-08 12:31:34 -04:00
Valeriy Sizov f682a6adb9 Merge pull request #9214 from Bugagazavr/hook-events
Added X-GitLab-Event header for web hooks
2015-05-08 17:17:01 +03:00
bugagazavr acac788902 Added X-GitLab-Event header for web hooks 2015-05-08 16:49:03 +03:00
Dmitriy Zaporozhets c3cf32e863
Merge branch 'version-check' into gl-version-check
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	app/controllers/admin/application_settings_controller.rb
	app/views/admin/application_settings/_form.html.haml
	db/schema.rb
2015-05-08 16:05:00 +03:00
Dmitriy Zaporozhets edf0a0715b
Remove unnecessary public key
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-08 15:59:34 +03:00
Martin Luder 55f91f3d43 Order commit comments in API chronologically
When fetching commit comments via API, the comments were not ordered,
but just returned in the order Postgresql finds them. Now the API always
returns comments in chronological order.
2015-05-08 14:34:10 +02:00
Dmitriy Zaporozhets f38ce01bc3
Remove encryption
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-08 15:14:56 +03:00
Dmitriy Zaporozhets 6c32abc5f7 Merge branch 'rs-task_list' into 'master'
Use task_list gem for task lists

Task Lists can now be used in comments, and they'll render in previews. 👏

Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2271

See merge request !599
2015-05-08 09:39:48 +00:00
Dmitriy Zaporozhets 5b8712e4c2 Merge branch 'master' of github.com:gitlabhq/gitlabhq 2015-05-08 12:26:58 +03:00
Jacob Vosmaer 1c1f18b416 Add SIDEKIQ_MEMORY_KILLER_SHUTDOWN_SIGNAL env var
It looks like SIGTERM may not be enough to shut down a Sidekiq process
when its RSS has gotten too big. This change will allow us to experiment
with sending SIGKILL instead of SIGTERM to Sidekiq processes on
gitlab.com.
2015-05-07 18:47:03 +02:00
Robert Speicher cca28c7920 Update Markdown help docs for latest changes 2015-05-06 21:04:33 -04:00
Robert Speicher 0a99e6e2fa Remove 'jasmine' gem
jasmine-rails still requires it as a dependency, but for some reason
running `rake jasmine:ci` produced test failures but
`rake spec:javascript` didn't.
2015-05-06 15:31:24 -04:00
Robert Speicher 6883e6e084 Remove all references to `parse_tasks` 2015-05-06 12:58:28 -04:00
Robert Speicher 61c73575c3 Add TaskList::Filter to pipeline 2015-05-06 12:58:27 -04:00
Dmitriy Zaporozhets 317ed1fa90 Revert "Allow to configure smtp and sendmail in gitlab.yml" 2015-05-06 17:39:18 +03:00
Jakub Jirutka b4be7aed77 Allow to configure smtp and sendmail in gitlab.yml 2015-05-06 13:15:33 +02:00
quodos b953796ac8 Update authentication.rb
correct spelling
2015-05-04 14:09:03 +02:00
Drunkard Zhang ef351f4cf4 Improve comments for shell_path 2015-05-04 16:46:16 +08:00
Sven Selberg 361284fec2 Add current_sign_in_at to api User 2015-05-04 09:42:11 +02: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 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
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
jubianchi 2c544d43c8 Query issues, merge requests and milestones with their IID through API 2015-05-02 10:44:52 +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 `&#39;` 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 466bec7caa Rename SCHEME_PATTERN to LINK_PATTERN 2015-04-30 16:35:27 -04:00
Robert Speicher cd3c24a8f3 Autolink short URLs 2015-04-30 16:35:27 -04:00
Robert Speicher 50f707e27a Update Autolink SCHEME_PATTERN 2015-04-30 16:35:26 -04:00
Robert Speicher 9ec8a5f75d Doc typo 2015-04-30 16:35:26 -04:00
Robert Speicher 421edd3545 Escape normal text in our Redcarpet renderer 2015-04-30 16:35:26 -04:00
Robert Speicher 588267b5e2 Update the Gitlab::Markdown docs 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
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
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
Jeroen van Baarsen 285cf3f772 Merge pull request #8677 from jubianchi/api-500-json
Send 500 errors as JSON in the API
2015-04-28 18:03:34 +02:00
jubianchi 3070b2cfc7 Add a rake task to automatically restart foreman when changes occur 2015-04-27 21:32:41 +02:00
jubianchi 79d0b69345 Send 500 errors as JSON in the API 2015-04-27 21:27:02 +02: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
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 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 7ee1d68e0d Merge pull request #9186 from Senorsen/patch-1
Fix contributions calendar empty problem under mysql
2015-04-27 11:20:24 +03:00
Dmitriy Zaporozhets b4317b1656 Merge branch 'fix-gitorious-importer' into 'master'
Get Gitorious importer to work again.

Fixes #1504.

See merge request !576
2015-04-27 07:42:32 +00:00
Dmitriy Zaporozhets 6de7f94f00 Merge branch 'rs-minor-styles' into 'master'
Minor design change grab-bag 🎉

I started with one simple change and found a few more, so here they are.

### Simplify icon style selectors

All FontAwesome icons have an `fa` class, so just use that.

### Don't override color of code blocks in notes

This was a pet peeve of mine.

| Before | After |
|:------:|:-----:|
| ![Screen_Shot_2015-04-23_at_4.14.23_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/c77cb0816bf0f05cb8c4105cdd8b3ec6/Screen_Shot_2015-04-23_at_4.14.23_PM.png) | ![Screen_Shot_2015-04-23_at_4.15.44_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/463c1d2052e12444563f5e2c102ac51e/Screen_Shot_2015-04-23_at_4.15.44_PM.png) |

### Items with tooltips don't need a 'data-original-title' attribute

This attribute gets added dynamically by Bootstrap's tooltip JS based on the `title` attribute

### Fix Profile > Design live-updating

`ui_blue` wasn't added to the list of classes to remove, so if a user changed to that theme, any subsequent changes wouldn't be live-updated.

This change refactors Gitlab::Theme a bit to make it harder for this to happen in the future with new themes.

### Remove the `has_bottom_tooltip` class

Bootstrap's tooltip JS can read the placement from a `data-placement` attribute.

Further, when we supply the `selector` option to `tooltip`, tooltips will be added to any dynamically-added elements matching the selector, without us having to re-call the `tooltip` method.

See merge request !569
2015-04-27 07:36:42 +00:00
Robert Speicher a64b5e3c60 Convert UserReferenceFilter#link_to_group to use a guard clause 2015-04-25 21:26:43 -04:00
Robert Speicher 92783eae2b Refactor `UserReferenceFilter#user_link_filter` 2015-04-25 18:07:20 -04:00
Robert Speicher 9d3a1d0054 Fix docs for `push_result`
[ci skip]
2015-04-25 17:44:24 -04:00
Robert Speicher 07a88040a4 Fix NotificationService spec 2015-04-25 16:46:06 -04:00
Robert Speicher 95ca6584d8 Add CommitRange directly to results Hash 2015-04-25 14:46:06 -04:00
Robert Speicher 2207e5a6c9 DRY up ReferenceExtractor 2015-04-25 14:41:07 -04:00
Robert Speicher c0a97d70ef Don't allow nil references to get added to results 2015-04-25 14:41:06 -04:00
Robert Speicher 6bac823ad4 Update CommitRangeReferenceFilter to use CommitRange class
Also matches CommitReferenceFilter's new behavior of always using short
SHAs in the link text.
2015-04-25 14:41:06 -04:00
Robert Speicher 2c8bfedb20 Always use short SHAs as commit reference link text
Now when a user pastes a full SHA like
`d7f61affaf845f44b4cc995e34eb1606c47c8eff`, its link text will only show
`d7f61aff` for brevity.
2015-04-25 14:40:40 -04:00
Robert Speicher 8f8a8ab32b Refactor ReferenceExtractor to use pipeline filters 2015-04-25 14:40:12 -04:00
Robert Speicher a6defd1576 Add results to reference filters 2015-04-25 14:39:45 -04:00
Robert Speicher 879be42862 Initialize the references result Hash in ReferenceFilter 2015-04-25 14:39:44 -04:00
bugagazavr 548f182814 Added X-GitLab-Event header for web hooks 2015-04-25 21:31:52 +03:00
Robert Speicher c597b5d09d Fix Profile > Design live-updating
`ui_blue` wasn't added to the list of classes to remove, so if a user
changed to that theme, any subsequent changes wouldn't be live-updated.

This change refactors Gitlab::Theme a bit to make it harder for this to
happen in the future with new themes.
2015-04-25 14:03:40 -04:00
tonic 2e34b7aab5 fix redis 3.0.0 2015-04-25 21:46:10 +08:00
Zhang Sen 0cbafa4d65 Fix contributions calendar empty problem under mysql
When using MySQL as database backend in GitLab, ``date`` in ``date(created_at), count(id) as total_amount``
won't return the ``date`` column (should be ``date(created_at)``), as a result, there's no contribution in the user
profile page.
Adding an ``as date`` can solve this problem.
2015-04-25 20:13:52 +08:00
Douwe Maan c2f11f3209 Get Gitorious importer to work again. 2015-04-24 23:30:12 +02:00
Douwe Maan b17f36f040 Add reset_session for the :reset_session strategy. 2015-04-24 20:10:32 +02:00
Douwe Maan 571ba5a7fe Protect OmniAuth request phase against CSRF. 2015-04-24 17:03:18 +02:00
Douwe Maan 5f839770e7 Revert "Rename namespace_regex to namespace_path_regex."
This reverts commit c0116926c7.
2015-04-24 15:16:38 +02:00
Douwe Maan c0116926c7 Rename namespace_regex to namespace_path_regex. 2015-04-24 14:49:22 +02:00
Douwe Maan 1d2a5ee188 Revert "Revert disallowing usernames to end in period."
This reverts commit c75c6b840b.
2015-04-24 14:47:49 +02:00
Douwe Maan 2456695422 Fix errors. 2015-04-24 12:30:37 +02:00
Douwe Maan 27af24c1c9 No longer needed to pass project argument to commit methods. 2015-04-24 12:29:36 +02:00
Douwe Maan 8ed7ac9d44 Use project.commit convenience method. 2015-04-24 12:29:36 +02:00
Douwe Maan 84a1590252 Let commit model know about its project. 2015-04-24 12:29:36 +02:00
Robert Speicher a14d109b9b Provide autoload paths for filters to prevent circular dependency 2015-04-23 12:58:55 -04:00
Dmitriy Zaporozhets 285ae60c15 Merge branch 'issue-body-code-mentions' into 'master'
Fix bug causing at-username inside code blocks to sometimes be picked up as a user mention.

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

See merge request !553
2015-04-23 12:33:01 +00:00
Robert Speicher fb5116caa2 Use `search_text_nodes` helper in our custom filters
Closes #1477
2015-04-22 13:18:15 -04:00
Robert Speicher fca624670a Update Gitlab::Markdown to use the 🆕 EmojiFilter
Removes emoji-centric tests from GFM specs 💥
2015-04-21 12:53:42 -04:00
Robert Speicher 4ced630fed Add Gitlab::Markdown::EmojiFilter 2015-04-21 12:53:42 -04:00
Dmitriy Zaporozhets 2cd501f7e4 Merge branch 'rs-reference-filters' into 'master'
Convert GFM reference handling to html-pipeline filters

- `Gitlab::Markdown` is now much cleaner
- Better separation of concerns
- Cleaner, less brittle, more maintainable specs for each reference type.
- Label references actually work!

See merge request !1753
2015-04-21 16:43:54 +00:00
Douwe Maan 51ad59e0d8 Fix bug causing `@whatever` inside code blocks to sometimes be picked up as a user mention. 2015-04-21 14:58:18 +02:00
Douwe Maan 1c30f77599 Don't autolink masked imported email addresses. 2015-04-21 10:32:48 +02:00
Douwe Maan 18f80c5560 Fix rendering of deleted blocking/blocked-on statuses. 2015-04-21 10:32:29 +02:00
Douwe Maan bc2dd5e772 Import "Comment #10" as "Comment 10" to not incorrectly reference issue. 2015-04-21 10:31:50 +02:00
Douwe Maan c242ca9a17 Get imported links to render correctly by not escaping all special chars. 2015-04-21 10:31:15 +02:00
Douwe Maan 96c03199dd Add "imported from Google Code" to imported issues. 2015-04-21 10:30:23 +02:00
Douwe Maan c52bf4ad3c Tweak single-word label regex to fix pending spec. 2015-04-20 13:01:47 -04:00
Douwe Maan b5802d144b project_from_ref returns nil when reference doesn't exist. 2015-04-20 13:01:47 -04:00
Robert Speicher 2823c058d8 project_from_ref returns nil when reference can't be accessed
Prior it would return the project from the current context, which wasn't
the intended behavior.
2015-04-20 13:01:47 -04:00
Robert Speicher 34f1dbb143 Better commit lookup for CommitRangeReferenceFilter 2015-04-20 13:01:46 -04:00
Robert Speicher 6853465acf Remove extraneous IGNORE_PARENTS from filter 2015-04-20 13:01:46 -04:00
Robert Speicher 621687bfdf Fix `user_can_reference_project?` check 2015-04-20 13:01:46 -04:00
Robert Speicher b905702d4f Escape title attributes in references 2015-04-20 13:01:46 -04:00
Robert Speicher 31172475d2 Better guard against nil projects in ReferenceFilter 2015-04-20 13:01:46 -04:00
Robert Speicher 9eaaa7cdef Minor doc fix
[ci skip]
2015-04-20 13:01:45 -04:00
Robert Speicher 5b6c1a2182 Fix Issue and ExternalIssue reference specs 2015-04-20 13:01:45 -04:00
Robert Speicher b3b8fc6c8a DRY up reference filters using ReferenceFilter base class 2015-04-20 13:01:45 -04:00
Robert Speicher 6189b24fdd Add a ReferenceFilter base class
This will allow for the removal of a lot of duplication from the
reference filters.
2015-04-20 13:01:45 -04:00
Robert Speicher c4eb6a55f1 Fix `user_can_reference_group?` check 2015-04-20 13:01:45 -04:00
Robert Speicher 52909f8bdb Add permission check to ReferenceExtractor's user mentions 2015-04-20 13:01:45 -04:00
Robert Speicher 62282971e0 Rename `user_can_read_group?` to `user_can_reference_group?` 2015-04-20 13:01:44 -04:00
Robert Speicher a803cd51eb Check for project read permissions in cross-references 2015-04-20 13:01:44 -04:00
Robert Speicher 34a23bda60 Add current_user to filter context 2015-04-20 13:01:43 -04:00
Robert Speicher 43c62ca3f2 Remove Gitlab::Markdown from Gitlab::ReferenceExtractor 2015-04-20 13:01:43 -04:00
Robert Speicher 29604ff2c3 Add permission checking to UserReferenceFilter 2015-04-20 13:01:43 -04:00
Robert Speicher 189c5347be Add name-based referencing to LabelReferenceFilter 2015-04-20 13:01:43 -04:00
Robert Speicher 77a6746a75 Run SanitizationFilter before our reference filters 2015-04-20 13:01:42 -04:00
Robert Speicher 4cb1cc2b64 Make CommitRange and Snippets cross-referable 2015-04-20 13:01:42 -04:00
Robert Speicher 96c2b94048 Reference filters
Commit ranges, commits, external issues, issues, labels, merge requests,
snippets, users.
2015-04-20 13:01:42 -04:00
Douwe Maan c75c6b840b Revert disallowing usernames to end in period. 2015-04-20 12:41:44 +02:00
Dmitriy Zaporozhets bd97715a57 Merge branch 'fix-label-color' into 'master'
Parse GFM references after sanitizing

Parse GFM references - labels, issues, MRs, etc. - after calling the HTML Pipeline `SanitizationFilter` so that we can use non-whitelisted attributes like `style`.  See #2188.

See merge request !1745
2015-04-20 08:40:13 +00:00
Vinnie Okada df9a992c15 Fix GFM extractions
Extract and re-insert links after sanitizing user markup.
2015-04-17 20:39:38 -06:00
Dmitriy Zaporozhets e1099f9717 Merge branch 'google-code-import-performance' into 'master'
Decrease memory use and increase performance of Google Code importer.

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

See merge request !536
2015-04-17 14:01:33 +00:00
Douwe Maan 38982136ec Decrease memory use and increase performance of Google Code importer. 2015-04-17 14:55:51 +02:00
Douwe Maan 7d98c8842d Move import data out of project so it doesn't take ages to load. 2015-04-17 14:49:00 +02:00
Vinnie Okada acd80bdc2d Add new rake task
Add a task that checks repository integrity with `git fsck`.
2015-04-15 22:22:20 -06:00