James Lopez
dad8fc242c
fix 404 error, redirect back with flash message
2016-07-07 15:34:45 +02:00
Grzegorz Bizon
9e211091a8
Enable Style/EmptyLines cop, remove redundant ones
2016-07-01 21:56:17 +02:00
Rémy Coutable
ce6635406c
Make GH one-off auth the default again for importing GH projects
...
Advertise the PAT as an alternative unless GH import is not configured.
Signed-off-by: Rémy Coutable <remy@rymai.me >
2016-06-30 18:48:17 +02:00
Eric K Idema and Rémy Coutable
12aa1f898d
Import from Github using Personal Access Tokens.
...
This stands as an alternative to using OAuth to access a user's Github
repositories. This is setup in such a way that it can be used without OAuth
configuration.
From a UI perspective, the how to import modal has been replaced by a full
page, which includes a form for posting a personal access token back to the
Import::GithubController.
If the user has logged in via GitHub, skip the Personal Access Token and go
directly to Github for an access token via OAuth.
2016-06-30 18:48:17 +02:00
James Lopez
c3b6eadc33
fix params
2016-06-24 11:41:33 +02:00
James Lopez
46b89a270f
Fix tmp file being deleted after the request plus some cleanup and improved erroring for this situation
2016-06-24 10:50:23 +02:00
James Lopez
4bde59341f
lots of refactoring again based on feedback. Changed the UI slightly and also fixed a small bug
2016-06-15 17:31:00 +02:00
James Lopez
7019a19b8c
cleanup namespace check now done by service
2016-06-15 09:08:33 +02:00
James Lopez
fc5f6943f8
yay finally importing working with the new services structure
2016-06-14 21:41:40 +02:00
James Lopez
ff44198e17
few fixes after refactoring the whole UI stuff
2016-06-14 21:03:14 +02:00
James Lopez
b53ed84843
adapted current services stuff to use new project import, plus fixes a few issues, updated routes, etc...
2016-06-14 20:32:19 +02:00
James Lopez
9ecebaaea1
adding notifications stuff and more refactoring for exporting projects
2016-06-14 16:31:03 +02:00
James Lopez
3f7ed55011
lots of refactoring to reuse import service
2016-06-14 12:47:07 +02:00
James Lopez
903da37755
WIP - starting refactoring import/export to use services
2016-06-13 20:35:57 +02:00
James Lopez
1ee19f04fd
fixed permissions
2016-05-13 17:16:24 +02:00
James Lopez
8c508037a6
updated controllers with permissions check
2016-05-13 17:03:03 +02:00
James Lopez
48fcf54040
add gitlab project controller - still WIP
2016-05-04 18:01:41 +02:00
James Lopez
7a531bb116
Merge branches 'feature/project-export-ui-experimental' and 'feature/project-import' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export-ui-experimental
2016-05-04 17:44:15 +02:00
James Lopez
a4d242b887
refactored some namespace stuff and fixed project tree restorer spec. also removing controller so that it belongs to the UI MR
2016-05-04 17:42:02 +02:00
James Lopez
3929972d90
Merge branch 'feature/project-import' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export-ui-experimental
...
# Conflicts:
# app/controllers/import/gitlab_project_controller.rb
2016-05-03 13:14:31 +02:00
James Lopez
6139e1433c
fixing some rubucop warnings
2016-05-03 12:46:00 +02:00
James Lopez
07ab6c2e26
refactoring and fixing a bunch of stuff
2016-05-02 11:29:21 +02:00
James Lopez
34c826a311
some JS magic to pass namespace and path importing projects
2016-04-27 15:01:55 +02:00
James Lopez
cbbc42e0c4
adding more UI changes, updated controller, worker and refactored import service
2016-04-26 17:12:50 +02:00
James Lopez
1d4c3fa150
more refactoring, now using custom job for processing project imports
2016-04-26 13:01:51 +02:00
James Lopez
28b0208e93
refactoring, mainly UI stuff to follow other import actions
2016-04-26 10:59:00 +02:00
James Lopez
10f1609535
changes to be picked by the UI branch
2016-04-25 18:00:15 +02:00
Stan Hu
9bfc531ec6
Redirect to a default path if HTTP_REFERER is not set
...
Safari 9.0 does not yet honor the HTML5 `origin-when-cross-origin` mode,
and it's possible load balancers/proxies strip the HTTP_REFERER from
the request header. In these cases, default to some default path.
Closes #3122
Closes https://github.com/gitlabhq/gitlabhq/issues/9731
2015-10-20 07:45:48 -07:00
Stan Hu
4ad64ab3f4
Fix duplicate repositories in GitHub import page
...
By default, all the current user's repositories are accessible via the
/users endpoint. There's no need to traverse all the organization
repositories as well.
See:
* http://www.rubydoc.info/github/pengwynn/octokit/Octokit/Client/Repositories#repositories-instance_method
* https://developer.github.com/v3/repos/#list-your-repositories
Closes #2523
2015-10-19 10:39:59 -07:00
Valery Sizov
8346dde052
Only render 404 page from /public
2015-10-13 20:12:34 +03:00
Jared Szechy
93bb8f14ef
Use fixed version of fogbugz gem
...
This allows us to properly handle authentication errors.
2015-09-15 15:23:30 -04:00
Jared Szechy
e156f42079
FogBugz project import
2015-09-08 20:23:01 -04:00
Stan Hu
ed1d4fa477
Remove user OAuth tokens stored in database for Bitbucket, GitHub, and GitLab
...
and request them each session. Pass these tokens to the project import data.
This prevents the need to encrypt these tokens and clear them in case they
expire or get revoked.
For example, if you deleted and re-created OAuth2 keys for Bitbucket, you would get
an Error 500 with no way to recover:
```
Started GET "/import/bitbucket/status" for x.x.x.x at 2015-08-07 05:24:10 +0000
Processing by Import::BitbucketController#status as HTML
Completed 500 Internal Server Error in 607ms (ActiveRecord: 2.3ms)
NameError (uninitialized constant Import::BitbucketController::Unauthorized):
app/controllers/import/bitbucket_controller.rb:77:in `rescue in go_to_bitbucket_for_permissions'
app/controllers/import/bitbucket_controller.rb:74:in `go_to_bitbucket_for_permissions'
app/controllers/import/bitbucket_controller.rb:86:in `bitbucket_unauthorized'
```
Closes #1871
2015-08-23 09:23:44 -07:00
Artem Sidorenko
e238a8dad5
Import sources: show only enabled sources
2015-08-20 12:13:22 +02:00
Stan Hu
d7accda1ae
Show incompatible projects in Bitbucket import status
...
See #1871
2015-08-07 07:07:08 -07:00
Douwe Maan
42ebd902de
Fix bug causing Bitbucket importer to crash when OAuth application had been removed.
2015-07-28 15:33:16 +02: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
c2f11f3209
Get Gitorious importer to work again.
2015-04-24 23:30:12 +02:00
Dmitriy Zaporozhets
2505300b7b
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
Conflicts:
app/controllers/import/google_code_controller.rb
2015-04-21 15:36:58 +03:00
Douwe Maan
355e6868a2
Fix redirect when trying to view invalid Google Code import status.
2015-04-21 10:30:07 +02:00
Jeroen van Baarsen
5a4ebfb47a
Fixed the Rails/ActionFilter cop
...
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com >
2015-04-20 15:39:37 +02:00
Douwe Maan
dfebcb89e6
Don't save unchanged user map items to the DB.
2015-04-17 13:32:29 +02:00
Douwe Maan
63b21945d2
Merge branch 'google-code-import' into 'master'
...
Import projects from Google Code.
Resolves #1257 .
Issue import logic almost entirely taken from https://gitlab.com/o9000/google-code-to-gitlab ( ♥️ @o9000).
### To do
- [x] List projects from Google Takeout file
- [x] Import Git repository
- [x] Import issues
- [x] Link to correct attachment URL (https://code.google.com/p/support-tools/issues/detail?id=50 )
- [x] Handle deleted attachments
- [x] Handle blockedOn attribute
- [x] Add directions on how to get data from Google Takeout
### Import instructions

### Imported issue

See merge request !471
2015-04-15 06:53:42 +00:00
Douwe Maan
dba63d667d
Allow user map to be specified.
2015-04-14 14:50:56 +02:00
Douwe Maan
e69e430ce7
Allow projects to be imported into namespaces user is master of.
2015-04-06 14:50:43 +02:00
Douwe Maan
17e2310878
Add instructions to Google Code import page.
2015-04-03 16:02:39 +02:00
Douwe Maan
7b5bc32cad
Allow projects to be imported from Google Code.
2015-04-03 15:29:27 +02:00
Douwe Maan
737f322e41
Import GitHub, Bitbucket or GitLab.com projects owned by authenticated user into current namespace.
2015-03-31 16:34:13 +02:00
Dmitriy Zaporozhets
1065f3d30b
Merge branch 'github-org-repos' into 'master'
...
Fix missing GitHub organisation repositories on import page.
Private repositories belonging to organizations rather than users can't be imported because `client.repos(org.login)` was requesting `/users/:org_login/repos` (which only returns public org repo's), while we need `/orgs/:org_login/repos` (which includes both public and private). The `client.org_repos` method does this.
cc @marin This is a bug in 7.8.x, but I'm not sure if it needs a minor release now or if it can go in 7.9.
See merge request !1683
2015-03-12 17:13:25 +00:00
Douwe Maan
3175438f02
Fix missing GitHub organisation repositories on import page.
2015-03-12 13:47:15 +01:00