Commit Graph
1519 Commits
Author SHA1 Message Date
Jacob Vosmaer bf253a1087 Obtain lease before querying LDAP 2016-03-11 13:47:49 +01:00
Jacob Vosmaer 73c777cf67 Backport ExclusiveLease to 8.5 2016-03-11 13:38:58 +01:00
Rémy Coutable a8ca1d5016 Merge branch 'fix/12652-omniauth-import-from-gitlab-com-fails' into 'master'
Fix import from gitlab.com fails

_Originally opened at !2896 by @kazsw._

- - -

Fixes #12652

CGI.escape encodes '/' by default.
Second argument can be removed.

See merge request !2988
2016-03-02 11:43:19 +01:00
Patricio CanoandRémy Coutable c1921fb510 Merge branch 'saml-decoupling' into 'master' 2016-02-19 16:45:18 +01:00
Douwe Maan 28d42a33f3 Merge branch 'rs-issue-13469' into 'master'
Handle nil commits in Gitlab::PushDataBuilder.build

Closes #13469

See merge request !2825
2016-02-17 14:19:20 +00:00
Douwe Maan bbbfdba0b9 Merge branch 'bugagazavr/gitlab-ce-extend-hooks' into 'master'
Add new data to project in push, issue, merge-request and note webhooks data

_Originally opened at !2738 by @bugagazavr._

- - -

**What does this MR do?**

Adds more data to hooks, makes repository data in all hook more dry ( use one hook_attrs method for repository data in all hooks )

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

1. https://gitlab.com/bugagazavr/gitlab-ce/blob/extend-hooks/app/models/project.rb#L738
2. https://gitlab.com/bugagazavr/gitlab-ce/blob/extend-hooks/app/models/concerns/issuable.rb#L132
3. https://gitlab.com/bugagazavr/gitlab-ce/blob/extend-hooks/lib/gitlab/push_data_builder.rb#L52
4. https://gitlab.com/bugagazavr/gitlab-ce/blob/extend-hooks/lib/gitlab/note_data_builder.rb#L56

**Why was this MR needed?**

More information about user for push events, and more data about repositiry ( project )

**What are the relevant issue numbers?**

No

**Screenshots (if relevant)**

No

See merge request !2788
2016-02-16 13:08:36 +00:00
Robert Speicher 789aef7f26 Handle nil commits in Gitlab::PushDataBuilder.build
Closes #13469
2016-02-15 16:06:45 -05:00
Robert Speicher 447568d15f Fix undefined method postgresql? during migration 2016-02-15 14:13:47 -05:00
Ben BoeckelandRémy Coutable e919b5a4e9 Fix relative links in other markup formats
- Apply the RelativeLinkFilter filter to other formats, e.g.,
  reStructuredText so links from the Files view or the Project view work
- Remove the AsciidocPipeline pipeline

Fixes #3533.
2016-02-12 17:20:59 +01:00
Rubén Dávila 5a5ee6188b Load all blob data when highlighting content for git-blame. 2016-02-11 18:30:05 -05:00
Kirill ZaitsevandRémy Coutable b123171d3d Add new data to project in push, issue, merge-request and note webhooks data
- Add `avatar_url`, `description`, `git_ssh_url`, `git_http_url`,
  `path_with_namespace` and `default_branch` in `project` in push, issue,
  merge-request and note webhooks data
- Deprecate the `ssh_url` in favor of `git_ssh_url` and `http_url` in
  favor of `git_http_url` in `project` for push, issue, merge-request and
  note webhooks data
- Deprecate the `repository` key in push, issue, merge-request and
  note webhooks data, use `project` instead
2016-02-11 17:22:11 +01:00
Robert Speicher 069937d2c7 Merge branch 'freeze-constants-lib-gitlab-git' into 'master'
Freeze constants in Gitlab::Git

See merge request !1730
2016-02-09 18:14:50 +00:00
Douwe Maan ceb342c716 Merge branch 'increase_import_timeout' into 'master'
Increase project import timeout from 4 minutes to 15 minutes

Many users were experiencing timeouts when we only allowed
4 minutes before a timeout. A 15 minute timeout is more
than reasonable and prevents us from having to add a
configuration for this.

Fixes gitlab-org/gitlab-ee#246

## Import screenshot

![Screen_Shot_2016-02-04_at_1.45.20_PM](/uploads/d9d71ec953afae31e6fbe54a8932b945/Screen_Shot_2016-02-04_at_1.45.20_PM.png)


See merge request !2717
2016-02-09 10:41:11 +00:00
Valery Sizov e0d7d2e9b4 Merge branch 'snippet_search_refactoring' 2016-02-09 12:04:59 +02:00
Jason LeeandRémy Coutable e4d276816a Fix CurrentSettings autoload bug in development.
Error: A copy of Gitlab::CurrentSettings has been removed from the module tree but is still active
2016-02-08 15:28:48 +01:00
Valery Sizov 8f929b8747 one more improvement to snippet search 2016-02-05 18:27:12 +02:00
Valery Sizov 94af78ac4a Faster snippet search 2016-02-05 18:20:29 +02:00
Zeger-Jan van de Weg 5ffec2c953 Freeze the expression instead of the literal
Also remove the spec for it
2016-02-05 08:39:44 +01:00
Zeger-Jan van de Weg be3399868c Minor refactoring on Gitlab::Git 2016-02-05 08:39:44 +01:00
Drew Blessing 5f38dbc026 Increase project import timeout from 4 minutes to 15 minutes
Many users were experiencing timeouts when we only allowed
4 minutes before a timeout. A 15 minute timeout is more
than reasonable and prevents us from having to add a
configuration for this.

Fixes gitlab-org/gitlab-ee#246
2016-02-04 13:41:42 -06:00
Douwe Maan ac923b4fb4 Merge branch 'fix/atom-url-issue' into 'master'
Fix atom url issue on projects

This MR adds prevents a project to have a path ending in .atom that conflicts with the feed

and 

Adds a migration to migrate old .atom projects to a different path

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

See merge request !2651
2016-02-04 16:12:47 +00:00
Dmitriy Zaporozhets dfe12649f6 Merge remote-tracking branch 'origin/rs-database-info' 2016-02-04 16:42:22 +01:00
Robert Speicher 8a85906a74 Merge branch 'support-akismet' into 'master'
Support Akismet spam checking for creation of issues via API

Currently any spam detected by Akismet for non-members via API will
be logged in a separate table in the admin page.

Closes #5612

See merge request !2266
2016-02-03 01:26:30 +00:00
Robert Speicher 4105f292e1 Display database type and version in Administration dashboard
Closes #12900
2016-02-02 17:59:09 -05:00
Jacob Vosmaer 752468d55b Merge branch 'git-raw-workhorse' into 'master'
Send raw Git blobs via gitlab-workhorse



See merge request !2451
2016-02-02 17:22:04 +00:00
James Lopez ecb174bfea fixed move project method in migration 2016-02-02 17:28:14 +01:00
James Lopez ae73e73bee Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/atom-url-issue 2016-02-02 15:15:59 +01:00
Jacob Vosmaer 15a1acb479 Merge remote-tracking branch 'origin/master' into git-raw-workhorse 2016-02-02 15:06:19 +01:00
Jacob Vosmaer d3affe8bca Merge remote-tracking branch 'origin/master' into lazy-blobs 2016-02-02 15:04:54 +01:00
Douglas Barbosa Alexandre 07384aa00d Memoize Akismet client initialization on AkismetHelper 2016-02-02 11:25:44 -02:00
Stan HuandDouglas Barbosa Alexandre d20e75a8d8 Support Akismet spam checking for creation of issues via API
Currently any spam detected by Akismet by non-members via API will be logged
in a separate table in the admin page.

Closes #5612
2016-02-02 11:25:44 -02:00
Jacob Vosmaer 72bd004b31 Allow "@" in file names and path 2016-02-01 16:20:49 +01:00
James Lopez 850942ceba Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/atom-url-issue 2016-02-01 15:49:03 +01:00
Jacob Vosmaer 51574d779c Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into lazy-blobs 2016-02-01 13:51:05 +01:00
Jacob Vosmaer b1f22aa35a Gotta have newlines 2016-02-01 12:27:35 +01:00
Jacob Vosmaer 2679ec4066 Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into git-raw-workhorse 2016-02-01 11:33:36 +01:00
Jacob Vosmaer 02afa6793c Use only one header to send git blobs 2016-02-01 11:33:22 +01:00
Douwe Maan 677b4db9e6 Mark inline difference between old and new paths when a file is renamed 2016-01-29 19:37:17 +01:00
James Lopez eb51a4ac1b refactor previous test and add validation to project model 2016-01-29 15:35:21 +01:00
Robert Speicher ca05054ea2 Partially revert "Add IP check against DNSBLs at account sign-up"
This partially reverts 6a5cd3ca - we keep the migration and add a new
migration that reverts it in order to keep migration history intact.
2016-01-28 16:28:19 -05:00
Robert Speicher 0e79b5f396 Merge branch 'highlight-blame' into 'master'
Fix highlighting in blame view.

See merge request !2630
2016-01-28 20:30:21 +00:00
Dmitriy Zaporozhets ee8884c68e Merge branch 'fix-preventing-migration-from-crashing-in-specific-cases' into 'master'
Fix preventing migration from crashing in very specific cases

Closes #12606. Closes #12501.

/cc @yorickpeterse @dbalexandre 

See merge request !2600
2016-01-28 15:20:14 +00:00
Douwe Maan b636f83e59 Move blame group logic to dedicated class 2016-01-28 14:49:21 +01:00
Rémy Coutable 55ab92c00b Use ActiveRecord::Base.connection.active? and rescue any exception in connect_to_db?
This ensures that rake tasks that don't need a DB connection can be run
without one.
2016-01-28 12:23:37 +01:00
Rémy Coutable 869b4d7c6a Only create the defaults ApplicationSetting when DB is fully migrated
Return a fake application settings OpenStruct when this is not the case.
Also, use ActiveRecord::Base.connection_pool.active_connection? instead
of ActiveRecord::Base.connection.active? to avoid driver exception.
2016-01-28 11:26:28 +01:00
Rémy Coutable e6f3fe5d3b Ensure rake tasks that don't need a DB connection can be run without one
When using ActiveRecord::Base.connection.active? without a DB
connection, we get a "PG::ConnectionBad: could not connect to server"
error because ActiveRecord::Base.connection doesn't exist. By using
ActiveRecord::Base.connected? we ensure we don't get this error if
the connection is missing, which is the all point of the
Gitlab::CurrentSettings#connect_to_db? method!
2016-01-26 15:11:15 +01:00
Douglas Barbosa Alexandre b58a2e30b2 Wrap errors on GitHub importer to raise Projects::ImportService::Error 2016-01-26 10:56:22 -02:00
Douglas Barbosa Alexandre c040323419 Move Gitlab::BitbucketImport::KeyDeleter to it's own importer 2016-01-26 10:56:22 -02:00
Yorick Peterse b74308c0a7 Correct arity for instrumented methods w/o args
This ensures that an instrumented method that doesn't take arguments
reports an arity of 0, instead of -1.

If Ruby had a proper method for finding out the required arguments of a
method (e.g. Method#required_arguments) this would not have been an
issue. Sadly the only two methods we have are Method#parameters and
Method#arity, and both are equally painful to use.

Fixes gitlab-org/gitlab-ce#12450
2016-01-25 21:28:59 +01:00
Rémy Coutable cd22da3ebd Fix preventing migration from crashing in very specific cases
See https://gitlab.com/gitlab-org/gitlab-ce/issues/12606 for details
2016-01-25 20:00:59 +01:00