Commit Graph

71 Commits

Author SHA1 Message Date
GitLab Bot 40fb10f78e Add latest changes from gitlab-org/gitlab@master 2023-06-17 03:08:18 +00:00
GitLab Bot e6d048d769 Add latest changes from gitlab-org/gitlab@master 2023-05-23 12:10:24 +00:00
GitLab Bot 41c4d7ff2a Add latest changes from gitlab-org/gitlab@master 2023-05-20 09:07:08 +00:00
GitLab Bot c54e7283c9 Add latest changes from gitlab-org/gitlab@master 2023-02-15 18:09:19 +00:00
GitLab Bot 6be8ed5a95 Add latest changes from gitlab-org/gitlab@master 2022-06-03 09:08:43 +00:00
GitLab Bot 860dab2f5f Add latest changes from gitlab-org/gitlab@master 2021-11-22 12:10:20 +00:00
GitLab Bot b86ad5f488 Add latest changes from gitlab-org/gitlab@master 2021-10-21 06:12:30 +00:00
GitLab Bot 27d1ed4ddf Add latest changes from gitlab-org/gitlab@master 2021-09-15 18:11:29 +00:00
GitLab Bot 2dedd78ef5 Add latest changes from gitlab-org/gitlab@master 2021-07-29 12:08:55 +00:00
GitLab Bot a662b146ac Add latest changes from gitlab-org/gitlab@master 2020-11-05 12:09:05 +00:00
GitLab Bot 5a7d44a955 Add latest changes from gitlab-org/gitlab@master 2020-10-29 12:08:50 +00:00
GitLab Bot 3e49ae159a Add latest changes from gitlab-org/gitlab@master 2020-10-28 18:08:52 +00:00
GitLab Bot a8caa9ce49 Add latest changes from gitlab-org/gitlab@master 2020-09-14 18:09:48 +00:00
GitLab Bot e1f8f12bbe Add latest changes from gitlab-org/gitlab@master 2020-06-19 15:08:39 +00:00
GitLab Bot 98252e0dd6 Add latest changes from gitlab-org/gitlab@master 2020-01-20 12:09:02 +00:00
GitLab Bot 5eb11b697d Add latest changes from gitlab-org/gitlab@master 2020-01-06 18:08:01 +00:00
GitLab Bot d10a462fed Add latest changes from gitlab-org/gitlab@master 2019-12-16 12:07:43 +00:00
GitLab Bot 8cc5f27909 Add latest changes from gitlab-org/gitlab@master 2019-12-13 12:07:41 +00:00
GitLab Bot b570d73ecd Add latest changes from gitlab-org/gitlab@master 2019-11-19 12:06:00 +00:00
dineshpanda e908e11776 Avoid calling freeze on already frozen strings in lib/gitlab 2019-09-04 09:52:02 +05:30
Felipe Artur c40bad741f Fix issuables state_id nil when importing projects from GitHub
Issues and merge requests imported from GitHub are having state_id
set to null. This fixes the GitHub project importer and schedule
migrations to fix state_id.
2019-05-06 19:45:17 +00:00
Nick Thomas 9f05e97aad
Run rubocop -a 2019-03-13 13:42:43 +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 100b050b99 Fix import handling errors in Bitbucket Server importer
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20724 removed
`Gitlab::Git::RepositoryMirroring::RemoteError`, but this was still
being handled in the Bitbucket Server importer and only encountered if
some exception other than `Gitlab::Shell::Error` were thrown.
2019-01-18 15:54:24 -08:00
Stan Hu e96fd232a6 Remove unnecessary includes of ShellAdapter
Determined by running the script:

```
included = `git grep --name-only ShellAdapter`.chomp.split("\n")
used = `git grep --name-only gitlab_shell`.chomp.split("\n")
included - used
```
2018-12-05 23:19:27 -08:00
Tiago Botelho 4bd8a427d4
Removes all the irrelevant import related code and columns
Clears the import related columns and code from the Project
model over to the ProjectImportState model
2018-11-27 12:58:13 +00:00
gfyoung e166e5747c Enable some frozen string in lib/gitlab
Enable frozen string for the following files:

* lib/gitlab/auth/**/*.rb
* lib/gitlab/badge/**/*.rb
* lib/gitlab/bare_repository_import/**/*.rb
* lib/gitlab/bitbucket_import/**/*.rb
* lib/gitlab/bitbucket_server_import/**/*.rb
* lib/gitlab/cache/**/*.rb
* lib/gitlab/checks/**/*.rb

Partially addresses #47424.
2018-10-13 02:31:31 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Stan Hu e850d4ea6c Add JSON logging for Bitbucket Server importer
Adds an importer.log so that it's easier to track what's happening with the import.
2018-08-30 10:58:31 -07:00
Stan Hu 09cdd7dca0 Bitbucket Server importer: Eliminate most idle-in-transaction issues
Just like with the GitHub importer, the Bitbucket Server importer can hit the
default 60 s idle-in-transaction timeouts if it takes too long to create the
merge request. We solve this by using the same approach as the GitHub importer:

1. Bypass all validation and hooks in creating a merge request
2. Insert the Git data in a separate transaction

Part of #50021
2018-08-26 07:13:36 -07:00
Stan Hu d8ce4f942b Remove date from author line since that is already present in `created_at` 2018-08-03 06:07:37 -07:00
Stan Hu 61f5c2e38c Add a comment when user can't be identified 2018-08-02 15:52:11 -07:00
Stan Hu db4ff688da Fix failing spec in fallback diff note change 2018-07-31 15:38:14 -07:00
Stan Hu da88f61b82 Improve formatting of fallback diff note 2018-07-31 15:33:21 -07:00
Stan Hu 2aa4d7f10f Fix bug where fallback diff notes would not have an associated position 2018-07-31 14:30:01 -07:00
Stan Hu 0b91a53302 Handle empty description field 2018-07-31 13:59:45 -07:00
Stan Hu 0085b76fb3 Give some context on threaded discussions 2018-07-31 11:33:37 -07:00
Stan Hu 89d164fbe9 Fix Rubocop complaint about update_attributes 2018-07-31 08:58:45 -07:00
Stan Hu 3cda8c93d8 Fix merge request SHA 2018-07-30 23:37:54 -07:00
Stan Hu 7c88c4af0e No need to look up commit SHA since Bitbucket has a full-length SHA 2018-07-30 23:19:36 -07:00
Stan Hu 7b23b55005 Restrict to confirmed users and allow memoization of unkonwn e-mails 2018-07-28 22:25:10 -07:00
Stan Hu f94b52256d Remove merge request deletion code 2018-07-20 22:31:17 -07:00
Stan Hu 69fe32a51c Disable recovery of missing SHAs by default 2018-07-20 09:45:59 -07:00
Stan Hu f673923d3f Fix and clean up code for deleting branches 2018-07-18 23:20:10 -07:00
Stan Hu a19a5b57e4 Improve formatting of diff notes that could not be imported 2018-07-17 21:42:07 -07:00
Stan Hu bb0603935d Some formatting cleanup 2018-07-17 15:58:12 -07:00
Stan Hu 099f9fcd13 Fallback to creating a note if DiffNote fails to import 2018-07-17 15:48:01 -07:00
Stan Hu da02df04ec Code cleanup and test threaded discussions 2018-07-17 15:01:33 -07:00
Stan Hu 78f23d3c17 Simplify user lookups 2018-07-17 13:53:48 -07:00
Stan Hu 7b288105ed Remove unneeded method 2018-07-17 13:46:09 -07:00