summaryrefslogtreecommitdiff
path: root/app/views/import
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-27 13:42:22 +0200
committerRémy Coutable <remy@rymai.me>2016-06-30 18:48:17 +0200
commitce6635406c8e2e4d336d6d7738a1e4916036871c (patch)
tree630e743cfba4adc0e94c2020ed1e86efffc5704b /app/views/import
parent12aa1f898dbfea3aaeb2de351ac1cccef304717f (diff)
downloadgitlab-ce-ce6635406c8e2e4d336d6d7738a1e4916036871c.tar.gz
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>
Diffstat (limited to 'app/views/import')
-rw-r--r--app/views/import/github/new.html.haml36
1 files changed, 21 insertions, 15 deletions
diff --git a/app/views/import/github/new.html.haml b/app/views/import/github/new.html.haml
index b071d2214c2..435ed7bd4cb 100644
--- a/app/views/import/github/new.html.haml
+++ b/app/views/import/github/new.html.haml
@@ -4,29 +4,35 @@
%h3.page-title
= icon 'github', text: 'Import Projects from GitHub'
-%p.light
- To import a project from GitHub, you can use a
- = link_to 'Personal Access Token', 'https://github.com/settings/tokens'
- to access your GitHub account. When you create your Personal Access Token,
+- if github_import_configured?
+ %p
+ To import a GitHub project, you first need to authorize GitLab to access
+ the list of your GitHub repositories:
+
+ = link_to 'List Your GitHub Repositories', status_import_github_path, class: 'btn btn-success'
+
+ %hr
+
+%p
+ - if github_import_configured?
+ Alternatively,
+ - else
+ To import a GitHub project,
+ you can use a
+ = succeed '.' do
+ = link_to 'Personal Access Token', 'https://github.com/settings/tokens'
+ When you create your Personal Access Token,
you will need to select the <code>repo</code> scope, so we can display a
list of your public and private repositories which are available for import.
= form_tag personal_access_token_import_github_path, method: :post, class: 'form-inline' do
.form-group
= text_field_tag :personal_access_token, '', class: 'form-control', placeholder: "Personal Access Token", size: 40
- = submit_tag 'List Repositories', class: 'btn btn-create'
+ = submit_tag 'List Your GitHub Repositories', class: 'btn btn-success'
-- if github_import_configured?
- - unless logged_in_with_github?
- %hr
- %p.light
- Note: If you go to
- = link_to 'your profile', profile_account_path
- and connect your account to GitHub, you can import projects without
- generating a Personal Access Token.
-- else
+- unless github_import_configured?
%hr
- %p.light
+ %p
Note:
- if current_user.admin?
As an administrator you may like to configure