2019-08-22 23:20:19 +00:00
|
|
|
- title = _('Authenticate with GitHub')
|
2018-03-07 15:58:50 +00:00
|
|
|
- page_title title
|
2021-06-07 18:10:23 +00:00
|
|
|
- header_title _("New project"), new_project_path
|
|
|
|
- add_to_breadcrumbs s_('ProjectsNew|Import project'), new_projects_path(anchor: 'import_project')
|
2016-05-02 15:22:38 +00:00
|
|
|
|
2021-06-07 18:10:23 +00:00
|
|
|
%h3.page-title
|
2019-08-22 23:20:19 +00:00
|
|
|
= title
|
2016-05-02 15:22:38 +00:00
|
|
|
|
2019-08-22 23:20:19 +00:00
|
|
|
%p
|
|
|
|
= import_github_authorize_message
|
2016-06-27 11:42:22 +00:00
|
|
|
|
2019-08-22 23:20:19 +00:00
|
|
|
- if github_import_configured? && !has_ci_cd_only_params?
|
2021-03-15 15:09:07 +00:00
|
|
|
= link_to status_import_github_path, class: 'gl-button btn btn-confirm' do
|
2020-10-20 09:08:43 +00:00
|
|
|
= sprite_icon('github', css_class: 'gl-mr-2')
|
|
|
|
= title
|
2016-06-27 11:42:22 +00:00
|
|
|
|
|
|
|
%hr
|
|
|
|
|
2019-08-22 23:20:19 +00:00
|
|
|
- unless github_import_configured? || has_ci_cd_only_params?
|
|
|
|
.bs-callout.bs-callout-info
|
|
|
|
= import_configure_github_admin_message
|
2016-05-02 15:22:38 +00:00
|
|
|
|
2019-08-22 23:20:19 +00:00
|
|
|
= form_tag personal_access_token_import_github_path, method: :post do
|
2016-05-02 15:22:38 +00:00
|
|
|
.form-group
|
2019-08-22 23:20:19 +00:00
|
|
|
%label.label-bold= _('Personal Access Token')
|
2020-01-03 03:07:49 +00:00
|
|
|
= text_field_tag :personal_access_token, '', class: 'form-control', placeholder: _('e.g. %{token}') % { token: '8d3f016698e...' }, data: { qa_selector: 'personal_access_token_field' }
|
2019-08-22 23:20:19 +00:00
|
|
|
%span.form-text.text-muted
|
|
|
|
= import_github_personal_access_token_message
|
2018-03-07 15:58:50 +00:00
|
|
|
|
2019-05-21 02:17:10 +00:00
|
|
|
= render_if_exists 'import/github/ci_cd_only'
|
|
|
|
|
2019-08-22 23:20:19 +00:00
|
|
|
.form-actions.d-flex.justify-content-end
|
2021-03-11 15:09:10 +00:00
|
|
|
= link_to _('Cancel'), new_project_path, class: 'gl-button btn btn-default'
|
|
|
|
= submit_tag _('Authenticate'), class: 'gl-button btn btn-confirm ml-2', data: { qa_selector: 'authenticate_button' }
|