Commit Graph

61 Commits

Author SHA1 Message Date
GitLab Bot 63b3a14f15 Add latest changes from gitlab-org/gitlab@master 2021-03-03 21:11:13 +00:00
GitLab Bot a662b146ac Add latest changes from gitlab-org/gitlab@master 2020-11-05 12:09:05 +00:00
GitLab Bot a8caa9ce49 Add latest changes from gitlab-org/gitlab@master 2020-09-14 18:09:48 +00:00
GitLab Bot 71da5de44f Add latest changes from gitlab-org/gitlab@master 2020-08-05 15:09:59 +00:00
GitLab Bot f155cc9034 Add latest changes from gitlab-org/gitlab@master 2019-10-16 03:06:12 +00:00
George Koltsov 91353779bf Add changelog entry 2019-08-12 11:16:17 +01:00
George Koltsov 1c2554bfd3 Add BitBucketServerImport project filtering 2019-08-12 11:16:17 +01:00
Yoginth 2f6a20ce66 Fix typos in the whole gitlab-ce project 2019-05-20 14:11:44 +00:00
Andrew Newdigate 3288e1a874 Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00
Stan Hu a0856cf7b9 Fix BitbucketServer::Client failing with Webmock 3.5.1
Webmock 3.1.0 changed the behavior to return `nil` for the body if an
HTTP 204 No Content response were received
(b837e64278).

Update the Bitbucket Server connection to ignore these No Content
response codes.
2019-02-16 15:30:02 -08:00
Stan Hu 660dcd5b7c Fix Bitbucket Server importer error handling
The importer would display a 500 error page if you attempted to import
using a non-existent DNS entry. This commit rescues known network issues
and consolidates them into
BitbucketServer::Connection::ConnectionError`.  The previous error
handling in the paginator doesn't work because it returns a lazy
collection.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56154
2019-01-12 22:14:08 -08:00
Stan Hu a06b7a7d5d Fix Bitbucket Server import only including first 25 pull requests
The change to paginate repos in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22825 caused the
paginator to stop after 25 pull requests because the limit was set to 25
if none was defined. To fix this, we should only stop if the limit has
actually been set and use the limit parameter to determine the maximum
number of items to process per page.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55914
2019-01-06 21:13:00 -08:00
Stan Hu 39f252254b Make sure there's only one slash as path separator
In Ruby 2.4, `URI.join("http://test//", "a").to_s` will
remove the double slash, however it's not the case in
Ruby 2.5. Using chomp should work better for the intention,
as we're not trying to allow things like ../ or / paths
resolution.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53180
2018-11-09 15:36:45 -08:00
Stan Hu 5b6d5301d9 Paginate Bitbucket Server importer projects
To prevent delays in loading the page and reduce memory usage, limit the
number of projects shown at 25 per page.

Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/50021
2018-11-07 11:37:46 -08:00
Stan Hu f2a99398bf Use a case statement to determine pull request state 2018-08-02 14:45:54 -07:00
Stan Hu aa5821e571 Assorted Bitbucket Server importer code cleanup based on review 2018-08-01 10:45:04 -07:00
Stan Hu d2fd6d2351 Deal with subpaths and trailing slashes properly 2018-07-31 21:14:36 -07:00
Stan Hu fc5df829bd Use URI.join to avoid slash headaches 2018-07-31 13:22:40 -07:00
Stan Hu dbef9f2151 Hide error details if there are none 2018-07-31 12:58:26 -07:00
Stan Hu 710d82104d Track parental relationships in comments 2018-07-31 11:12:10 -07:00
Stan Hu 3cda8c93d8 Fix merge request SHA 2018-07-30 23:37:54 -07:00
Stan Hu 6408cd0020 Use raw_comment 2018-07-28 21:50:48 -07:00
Stan Hu dd937377cf Use a class method to consolidate timestamp conversion 2018-07-28 21:48:37 -07:00
Stan Hu 57d1b60f61 Handle invalid JSON from server 2018-07-27 14:29:05 -07:00
Stan Hu 450030e902 Add Accept header for JSON 2018-07-27 12:58:17 -07:00
Stan Hu 3f715bb438 Consolidate server errors and add specs 2018-07-26 23:05:22 -07:00
Stan Hu 7ee9c3c436 Use project key instead of project name for imports 2018-07-26 15:45:38 -07:00
Stan Hu e52f6bf5f9 Fix failing spec 2018-07-25 22:32:10 -07:00
Stan Hu f7a7a753a4 Add comment about why using `first` 2018-07-25 21:45:13 -07:00
Stan Hu 930b5e7a5b Add spec for pull request comments and add comments 2018-07-25 21:39:52 -07:00
Stan Hu 771dec8470 Clean up implementation 2018-07-25 20:53:25 -07:00
Stan Hu bf2d029a3d Add spec for pull request activity 2018-07-25 15:39:39 -07:00
Stan Hu 4160a8dd81 Enable frozen_string_literal 2018-07-25 05:22:53 -07:00
Stan Hu 3fd704b239 Add spec for BitBucketServer pull reuest parsing 2018-07-20 22:30:28 -07:00
Stan Hu 7c1aaf68f8 Add spec for BitbucketServer::Representation::Repo 2018-07-20 21:47:00 -07:00
Stan Hu 9d59616b95 Fix URL for deleting branches 2018-07-18 23:15:24 -07:00
Stan Hu 19cd1ba7bc Fix identation in lib/bitbucket_server/connection.rb 2018-07-17 22:29:18 -07:00
Stan Hu c793252e8b Add support for deleting branches via the Bitbucket Server API 2018-07-13 15:39:24 -07:00
Stan Hu ec4109d413 Make Connection#post consistent with Connection#get and add specs 2018-07-12 23:17:05 -07:00
Stan Hu 15220291ae Add spec for BitbucketServer::Connection 2018-07-12 22:33:36 -07:00
Stan Hu f85712fb98 Use browse URL of project to link imports 2018-07-12 15:26:37 -07:00
Stan Hu bb98ed112c Add missing file 2018-07-10 23:21:12 -07:00
Stan Hu 12b031ce8f Fix pagination 2018-07-05 21:11:16 -07:00
Stan Hu 022a0c2fde Fix Rubocop errors 2018-07-05 21:11:03 -07:00
Stan Hu a78e36abab Improve error handling of Bitbucket login errors 2018-07-05 14:09:01 -07:00
Stan Hu d3c75ea4d9 Support creating a remote branch to import closed pull requests 2018-07-03 16:37:17 -07:00
Stan Hu 8377057364 Fix URL link in Bitbucket status 2018-07-01 05:55:23 -07:00
Stan Hu 3735ce43fc Add a Reconfigure button and improve layout of import screen 2018-07-01 05:13:15 -07:00
Stan Hu a4cbbfe465 Fix Rubocop complaints 2018-06-28 22:26:33 -07:00
Stan Hu bba5975a72 Prune unused code 2018-06-28 22:18:42 -07:00