Commit dd691a4b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ce-to-ee' into 'master'

Ce to ee

See merge request !417
parents c05a0afb 962fe84e
...@@ -63,13 +63,11 @@ class @Notes ...@@ -63,13 +63,11 @@ class @Notes
# fetch notes when tab becomes visible # fetch notes when tab becomes visible
$(document).on "visibilitychange", @visibilityChange $(document).on "visibilitychange", @visibilityChange
@notes_forms = '.js-main-target-form textarea, .js-discussion-note-form textarea'
# Chrome doesn't fire keypress or keyup for Command+Enter, so we need keydown. # Chrome doesn't fire keypress or keyup for Command+Enter, so we need keydown.
$(document).on('keydown', @notes_forms, (e) -> $(document).on 'keydown', '.js-note-text', (e) ->
return if e.originalEvent.repeat return if e.originalEvent.repeat
if e.keyCode == 10 || ((e.metaKey || e.ctrlKey) && e.keyCode == 13) if e.keyCode == 10 || ((e.metaKey || e.ctrlKey) && e.keyCode == 13)
$(@).parents('form').submit() $(@).closest('form').submit()
)
cleanBinding: -> cleanBinding: ->
$(document).off "ajax:success", ".js-main-target-form" $(document).off "ajax:success", ".js-main-target-form"
...@@ -84,7 +82,7 @@ class @Notes ...@@ -84,7 +82,7 @@ class @Notes
$(document).off "click", ".js-discussion-reply-button" $(document).off "click", ".js-discussion-reply-button"
$(document).off "click", ".js-add-diff-note-button" $(document).off "click", ".js-add-diff-note-button"
$(document).off "visibilitychange" $(document).off "visibilitychange"
$(document).off "keydown", @notes_forms $(document).off "keydown", ".js-note-text"
$(document).off "keyup", ".js-note-text" $(document).off "keyup", ".js-note-text"
$(document).off "click", ".js-note-target-reopen" $(document).off "click", ".js-note-target-reopen"
$(document).off "click", ".js-note-target-close" $(document).off "click", ".js-note-target-close"
......
...@@ -49,14 +49,6 @@ label { ...@@ -49,14 +49,6 @@ label {
width: 250px; width: 250px;
} }
.input-mx-250 {
max-width: 250px;
}
.input-mn-300 {
min-width: 300px;
}
.custom-form-control { .custom-form-control {
width: 150px; width: 150px;
} }
......
...@@ -202,9 +202,17 @@ header { ...@@ -202,9 +202,17 @@ header {
} }
} }
li { .navbar-collapse {
display: table-cell; padding-left: 5px;
width: 1%;
li {
display: table-cell;
width: 1%;
a {
margin-left: 8px !important;
}
}
} }
} }
} }
...@@ -64,6 +64,21 @@ ...@@ -64,6 +64,21 @@
margin-left: 15px !important; margin-left: 15px !important;
max-width: 70% !important; max-width: 70% !important;
} }
.issue-info, .merge-request-info {
display: none;
}
.issue-details {
.creator,
.page-title .btn-close {
display: none;
}
}
%ul.notes .note-role, .note-actions {
display: none;
}
} }
@media (max-width: $screen-sm-max) { @media (max-width: $screen-sm-max) {
......
...@@ -130,14 +130,6 @@ ...@@ -130,14 +130,6 @@
.username { .username {
display: none; display: none;
} }
.avatar {
margin-bottom: 10px;
}
.logout-holder {
text-align: center;
}
} }
} }
} }
...@@ -188,9 +180,8 @@ ...@@ -188,9 +180,8 @@
bottom: 0; bottom: 0;
width: 100%; width: 100%;
padding: 10px; padding: 10px;
color: #fff;
.avatar { .username {
margin-top: 5px; margin-top: 5px;
} }
} }
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
line-height: 24px; line-height: 24px;
.str-truncated { .str-truncated {
max-width: 72%; max-width: 76%;
} }
a { a {
......
...@@ -145,3 +145,9 @@ h2.issue-title { ...@@ -145,3 +145,9 @@ h2.issue-title {
.issue-form .select2-container { .issue-form .select2-container {
width: 250px !important; width: 250px !important;
} }
.issues-holder {
.issue-info {
margin-left: 20px;
}
}
...@@ -30,8 +30,12 @@ ...@@ -30,8 +30,12 @@
border-right: 1px solid $color-darker; border-right: 1px solid $color-darker;
.sidebar-user { .sidebar-user {
a { color: $color-light;
color: $color-light;
&:hover {
background-color: $color-dark;
color: #FFF;
text-decoration: none;
} }
} }
} }
......
...@@ -67,7 +67,13 @@ module Mentionable ...@@ -67,7 +67,13 @@ module Mentionable
# Create a cross-reference Note for each GFM reference to another Mentionable found in +mentionable_text+. # Create a cross-reference Note for each GFM reference to another Mentionable found in +mentionable_text+.
def create_cross_references!(p = project, a = author, without = []) def create_cross_references!(p = project, a = author, without = [])
refs = references(p) - without refs = references(p)
# We're using this method instead of Array diffing because that requires
# both of the object's `hash` values to be the same, which may not be the
# case for otherwise identical Commit objects.
refs.reject! { |ref| without.include?(ref) }
refs.each do |ref| refs.each do |ref|
Note.create_cross_reference_note(ref, local_reference, a) Note.create_cross_reference_note(ref, local_reference, a)
end end
......
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
.form-group.js-toggle-colors-container.hide .form-group.js-toggle-colors-container.hide
= f.label :color, "Background Color", class: 'control-label' = f.label :color, "Background Color", class: 'control-label'
.col-sm-10 .col-sm-10
= f.color_field :color, value: "#AA33EE", class: "form-control" = f.color_field :color, value: "#eb9532", class: "form-control"
.form-group.js-toggle-colors-container.hide .form-group.js-toggle-colors-container.hide
= f.label :font, "Font Color", class: 'control-label' = f.label :font, "Font Color", class: 'control-label'
.col-sm-10 .col-sm-10
= f.color_field :font, value: "#224466", class: "form-control" = f.color_field :font, value: "#FFFFFF", class: "form-control"
.form-group .form-group
= f.label :starts_at, class: 'control-label' = f.label :starts_at, class: 'control-label'
.col-sm-10.datetime-controls .col-sm-10.datetime-controls
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
= form_tag admin_groups_path, method: :get, class: 'form-inline' do = form_tag admin_groups_path, method: :get, class: 'form-inline' do
= hidden_field_tag :sort, @sort = hidden_field_tag :sort, @sort
.form-group .form-group
= text_field_tag :name, params[:name], class: "form-control input-mn-300" = text_field_tag :name, params[:name], class: "form-control"
= button_tag "Search", class: "btn submit btn-primary" = button_tag "Search", class: "btn submit btn-primary"
.pull-right .pull-right
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
%h3.page-title %h3.page-title
Group Membership Group Membership
- if current_user.can_create_group? - if current_user.can_create_group?
%span.pull-right %span.pull-right.hidden-xs
= link_to new_group_path, class: "btn btn-new" do = link_to new_group_path, class: "btn btn-new" do
%i.fa.fa-plus %i.fa.fa-plus
New Group New Group
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
- @group_members.each do |group_member| - @group_members.each do |group_member|
- group = group_member.group - group = group_member.group
%li %li
.pull-right .pull-right.hidden-xs
- if can?(current_user, :admin_group, group) - if can?(current_user, :admin_group, group)
= link_to edit_group_path(group), class: "btn-sm btn btn-grouped" do = link_to edit_group_path(group), class: "btn-sm btn btn-grouped" do
%i.fa.fa-cogs %i.fa.fa-cogs
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
%i.fa.fa-sign-out %i.fa.fa-sign-out
Leave Leave
= image_tag group_icon(group), class: "avatar s40 avatar-tile" = image_tag group_icon(group), class: "avatar s40 avatar-tile hidden-xs"
= link_to group, class: 'group-name' do = link_to group, class: 'group-name' do
%strong= group.name %strong= group.name
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= form_tag explore_groups_path, method: :get, class: 'form-inline form-tiny' do |f| = form_tag explore_groups_path, method: :get, class: 'form-inline form-tiny' do |f|
= hidden_field_tag :sort, @sort = hidden_field_tag :sort, @sort
.form-group .form-group
= search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input input-mn-300", id: "groups_search" = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "groups_search"
.form-group .form-group
= button_tag 'Search', class: "btn btn-primary wide" = button_tag 'Search', class: "btn btn-primary wide"
......
.pull-left .pull-left
= form_tag explore_projects_filter_path, method: :get, class: 'form-inline form-tiny' do |f| = form_tag explore_projects_filter_path, method: :get, class: 'form-inline form-tiny' do |f|
.form-group .form-group
= search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input input-mn-300", id: "projects_search" = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "projects_search"
.form-group .form-group
= button_tag 'Search', class: "btn btn-primary wide" = button_tag 'Search', class: "btn btn-primary wide"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
.clearfix.js-toggle-container .clearfix.js-toggle-container
= form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form' do = form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form' do
.form-group .form-group
= search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input input-mn-300' } = search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input' }
= button_tag 'Search', class: 'btn' = button_tag 'Search', class: 'btn'
- if current_user && current_user.can?(:admin_group, @group) - if current_user && current_user.can?(:admin_group, @group)
......
...@@ -20,5 +20,3 @@ ...@@ -20,5 +20,3 @@
= render 'layouts/google_analytics' if extra_config.has_key?('google_analytics_id') = render 'layouts/google_analytics' if extra_config.has_key?('google_analytics_id')
= render 'layouts/piwik' if extra_config.has_key?('piwik_url') && extra_config.has_key?('piwik_site_id') = render 'layouts/piwik' if extra_config.has_key?('piwik_url') && extra_config.has_key?('piwik_site_id')
= render 'layouts/bootlint' if Rails.env.development? = render 'layouts/bootlint' if Rails.env.development?
= yield :scripts_head
...@@ -8,14 +8,10 @@ ...@@ -8,14 +8,10 @@
.collapse-nav .collapse-nav
= render partial: 'layouts/collapse_button' = render partial: 'layouts/collapse_button'
- if current_user - if current_user
.sidebar-user = link_to current_user, class: 'sidebar-user' do
= link_to current_user, class: 'profile-pic', id: 'profile-pic', data: {toggle: 'tooltip', placement: 'top'} do = image_tag avatar_icon(current_user.email, 60), alt: 'User activity', class: 'avatar avatar s32'
= image_tag avatar_icon(current_user.email, 60), alt: 'User activity', class: 'avatar avatar s32'
.username .username
= current_user.username = current_user.username
.logout-holder
= link_to destroy_user_session_path, class: 'logout', method: :delete, title: 'Sign out', data: {toggle: 'tooltip', placement: 'top'} do
= icon('sign-out')
.content-wrapper .content-wrapper
.container-fluid .container-fluid
.content .content
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
%html{ lang: "en"} %html{ lang: "en"}
= render "layouts/head" = render "layouts/head"
%body{class: "#{app_theme}", :'data-page' => body_data_page} %body{class: "#{app_theme}", :'data-page' => body_data_page}
/ Ideally this would be inside the head, but turbolinks only evaluates page-specific JS in the body.
= yield :scripts_body_top
- if current_user - if current_user
= render "layouts/header/default", title: header_title = render "layouts/header/default", title: header_title
- else - else
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
%li.visible-sm.visible-xs %li.visible-sm.visible-xs
= link_to search_path, title: 'Search', data: {toggle: 'tooltip', placement: 'bottom'} do = link_to search_path, title: 'Search', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('search') = icon('search')
%li %li.hidden-xs
= link_to help_path, title: 'Help', data: {toggle: 'tooltip', placement: 'bottom'} do = link_to help_path, title: 'Help', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('question-circle fw') = icon('question-circle fw')
%li %li
...@@ -33,11 +33,14 @@ ...@@ -33,11 +33,14 @@
= link_to admin_root_path, title: 'Admin area', data: {toggle: 'tooltip', placement: 'bottom'} do = link_to admin_root_path, title: 'Admin area', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('wrench fw') = icon('wrench fw')
- if current_user.can_create_project? - if current_user.can_create_project?
%li %li.hidden-xs
= link_to new_project_path, title: 'New project', data: {toggle: 'tooltip', placement: 'bottom'} do = link_to new_project_path, title: 'New project', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('plus fw') = icon('plus fw')
%li %li
= link_to profile_path, title: 'Profile settings', data: {toggle: 'tooltip', placement: 'bottom'} do = link_to profile_path, title: 'Profile settings', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('cog fw') = icon('cog fw')
%li
= link_to destroy_user_session_path, class: 'logout', method: :delete, title: 'Sign out', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('sign-out')
= render 'shared/outdated_browser' = render 'shared/outdated_browser'
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
- header_title project_title(@project) - header_title project_title(@project)
- sidebar "project" unless sidebar - sidebar "project" unless sidebar
- content_for :scripts_head do - content_for :scripts_body_top do
-if current_user - if current_user
:javascript :javascript
window.project_uploads_path = "#{namespace_project_uploads_path @project.namespace, @project}"; window.project_uploads_path = "#{namespace_project_uploads_path @project.namespace, @project}";
window.markdown_preview_path = "#{markdown_preview_namespace_project_path(@project.namespace, @project)}"; window.markdown_preview_path = "#{markdown_preview_namespace_project_path(@project.namespace, @project)}";
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :modify_issue, issue) = check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :modify_issue, issue)
.issue-title .issue-title
%span.str-truncated %span.issue-title-text
= link_to_gfm issue.title, issue_path(issue), class: "row_title" = link_to_gfm issue.title, issue_path(issue), class: "row_title"
.issue-labels .issue-labels
- issue.labels.each do |label| - issue.labels.each do |label|
......
%li{ class: mr_css_classes(merge_request) } %li{ class: mr_css_classes(merge_request) }
.merge-request-title .merge-request-title
%span.str-truncated %span.merge-request-title-text
= link_to_gfm merge_request.title, merge_request_path(merge_request), class: "row_title" = link_to_gfm merge_request.title, merge_request_path(merge_request), class: "row_title"
.merge-request-labels .merge-request-labels
- merge_request.labels.each do |label| - merge_request.labels.each do |label|
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
= render 'shared/issuable_search_form', path: namespace_project_merge_requests_path(@project.namespace, @project) = render 'shared/issuable_search_form', path: namespace_project_merge_requests_path(@project.namespace, @project)
- if can? current_user, :write_merge_request, @project - if can? current_user, :write_merge_request, @project
= link_to new_namespace_project_merge_request_path(@project.namespace, @project), class: "btn btn-new pull-left", title: "New Merge Request" do .pull-left.hidden-xs
%i.fa.fa-plus = link_to new_namespace_project_merge_request_path(@project.namespace, @project), class: "btn btn-new", title: "New Merge Request" do
New Merge Request %i.fa.fa-plus
New Merge Request
= render 'shared/issuable_filter', type: :merge_requests = render 'shared/issuable_filter', type: :merge_requests
.merge-requests-holder .merge-requests-holder
= render 'merge_requests' = render 'merge_requests'
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
.clearfix.js-toggle-container .clearfix.js-toggle-container
= form_tag namespace_project_project_members_path(@project.namespace, @project), method: :get, class: 'form-inline member-search-form' do = form_tag namespace_project_project_members_path(@project.namespace, @project), method: :get, class: 'form-inline member-search-form' do
.form-group .form-group
= search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input input-mn-300' } = search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input' }
= button_tag 'Search', class: 'btn' = button_tag 'Search', class: 'btn'
- if !membership_locked? && can?(current_user, :admin_project_member, @project) - if !membership_locked? && can?(current_user, :admin_project_member, @project)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
= hidden_field_tag :scope, params[:scope] = hidden_field_tag :scope, params[:scope]
.search-holder.clearfix .search-holder.clearfix
.form-group .form-group
= search_field_tag :search, params[:search], placeholder: "Search for projects, issues etc", class: "form-control search-text-input input-mn-300", id: "dashboard_search", autofocus: true = search_field_tag :search, params[:search], placeholder: "Search for projects, issues etc", class: "form-control search-text-input", id: "dashboard_search", autofocus: true
= button_tag 'Search', class: "btn btn-primary" = button_tag 'Search', class: "btn btn-primary"
- unless params[:snippets].eql? 'true' - unless params[:snippets].eql? 'true'
.pull-right .pull-right
......
= form_tag(path, method: :get, id: "issue_search_form", class: 'pull-left issue-search-form') do = form_tag(path, method: :get, id: "issue_search_form", class: 'pull-left issue-search-form') do
.append-right-10.hidden-xs.hidden-sm .append-right-10.hidden-xs.hidden-sm
= search_field_tag :issue_search, params[:issue_search], { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input input-mn-300' } = search_field_tag :issue_search, params[:issue_search], { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input' }
= hidden_field_tag :state, params['state'] = hidden_field_tag :state, params['state']
= hidden_field_tag :scope, params['scope'] = hidden_field_tag :scope, params['scope']
= hidden_field_tag :assignee_id, params['assignee_id'] = hidden_field_tag :assignee_id, params['assignee_id']
......
...@@ -16,6 +16,3 @@ ...@@ -16,6 +16,3 @@
%span.pull-right.light %span.pull-right.light
%i.fa.fa-star %i.fa.fa-star
= project.star_count = project.star_count
- else
%span.arrow
%i.fa.fa-angle-right
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
%h3 %h3
= @user.name = @user.name
- if @user == current_user - if @user == current_user
.pull-right .pull-right.hidden-xs
= link_to profile_path, class: 'btn btn-sm' do = link_to profile_path, class: 'btn btn-sm' do
%i.fa.fa-pencil-square-o %i.fa.fa-pencil-square-o
Edit Profile settings Edit Profile settings
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
## User documentation ## User documentation
- [API](api/README.md) Automate GitLab via a simple and powerful API. - [API](api/README.md) Automate GitLab via a simple and powerful API.
- [Importing to GitLab](workflow/importing/README.md).
- [Markdown](markdown/markdown.md) GitLab's advanced formatting system. - [Markdown](markdown/markdown.md) GitLab's advanced formatting system.
- [Permissions](permissions/permissions.md) Learn what each role in a project (guest/reporter/developer/master/owner) can do. - [Permissions](permissions/permissions.md) Learn what each role in a project (guest/reporter/developer/master/owner) can do.
- [Project Services](project_services/project_services.md) Integrate a project with external services, such as CI and chat. - [Project Services](project_services/project_services.md) Integrate a project with external services, such as CI and chat.
...@@ -36,4 +37,4 @@ ...@@ -36,4 +37,4 @@
- [Development](development/README.md) Explains the architecture and the guidelines for shell commands. - [Development](development/README.md) Explains the architecture and the guidelines for shell commands.
- [Legal](legal/README.md) Contributor license agreements. - [Legal](legal/README.md) Contributor license agreements.
- [Release](release/README.md) How to make the monthly and security releases. - [Release](release/README.md) How to make the monthly and security releases.
\ No newline at end of file
# Import your project from Bitbucket to GitLab # Import your project from Bitbucket to GitLab
It takes just a few steps to import your existing Bitbucket projects to GitLab. But keep in mind that it is possible only if Bitbucket support is enabled on your GitLab instance. You can read more about Bitbucket support [here](doc/integration/bitbucket.md). It takes just a few steps to import your existing Bitbucket projects to GitLab. But keep in mind that it is possible only if Bitbucket support is enabled on your GitLab instance. You can read more about Bitbucket support [here](doc/integration/bitbucket.md).
1. Sign in to GitLab.com and go to your dashboard * Sign in to GitLab.com and go to your dashboard
2. Click on "New project" * Click on "New project"
![New project in GitLab](bitbucket_importer/bitbucket_import_new_project.jpg) ![New project in GitLab](bitbucket_importer/bitbucket_import_new_project.jpg)
3. Click on the "Bitbucket" button * Click on the "Bitbucket" button
![Bitbucket](bitbucket_importer/bitbucket_import_select_bitbucket.jpg) ![Bitbucket](bitbucket_importer/bitbucket_import_select_bitbucket.jpg)
4. Grant GitLab access to your Bitbucket account * Grant GitLab access to your Bitbucket account
![Grant access](bitbucket_importer/bitbucket_import_grant_access.jpg) ![Grant access](bitbucket_importer/bitbucket_import_grant_access.jpg)
5. Click on the projects that you'd like to import or "Import all projects" * Click on the projects that you'd like to import or "Import all projects"
![Import projects](bitbucket_importer/bitbucket_import_select_project.png) ![Import projects](bitbucket_importer/bitbucket_import_select_project.png)
A new GitLab project will be created with your imported data. A new GitLab project will be created with your imported data.
### Note
Milestones and wiki pages are not imported from Bitbucket.
\ No newline at end of file
# Import your project from GitHub to GitLab # Import your project from GitHub to GitLab
It takes just a couple of steps to import your existing GitHub projects to GitLab. Keep in mind that it is possible only if It takes just a couple of steps to import your existing GitHub projects to GitLab. Keep in mind that it is possible only if
GitHub support is enabled on your GitLab instance. You can read more about GitHub support [here](http://doc.gitlab.com/ce/integration/github.html) GitHub support is enabled on your GitLab instance. You can read more about GitHub support [here](http://doc.gitlab.com/ce/integration/github.html)
1. Sign in to GitLab.com and go to your dashboard. * Sign in to GitLab.com and go to your dashboard.
2. To get to the importer page, you need to go to the "New project" page. * To get to the importer page, you need to go to the "New project" page.
![New project page](github_importer/new_project_page.png) ![New project page](github_importer/new_project_page.png)
3. Click on the "Import project from GitHub" link and you will be redirected to GitHub for permission to access your projects. After accepting, you'll be automatically redirected to the importer. * Click on the "Import project from GitHub" link and you will be redirected to GitHub for permission to access your projects. After accepting, you'll be automatically redirected to the importer.
![Importer page](github_importer/importer.png) ![Importer page](github_importer/importer.png)
4. To import a project, you can simple click "Add". The importer will import your repository and issues. Once the importer is done, a new GitLab project will be created with your imported data. * To import a project, you can simple click "Add". The importer will import your repository and issues. Once the importer is done, a new GitLab project will be created with your imported data.
### Note ### Note
When you import your projects from GitHub, it is not possible to keep your labels and milestones and issue numbers won't match. We are working on improving this in the near future. When you import your projects from GitHub, it is not possible to keep your labels and milestones and issue numbers won't match. We are working on improving this in the near future.
\ No newline at end of file
...@@ -12,6 +12,7 @@ This styleguide recommends best practices to improve documentation and to keep i ...@@ -12,6 +12,7 @@ This styleguide recommends best practices to improve documentation and to keep i
* Be brief and clear. * Be brief and clear.
* Whenever it applies, add documents in alphabetical order.
## When adding images to a document ## When adding images to a document
......
...@@ -168,7 +168,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps ...@@ -168,7 +168,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
end end
step 'I click on my profile picture' do step 'I click on my profile picture' do
click_link 'profile-pic' find(:css, '.sidebar-user').click
end end
step 'I should see my user page' do step 'I should see my user page' do
......
...@@ -4,11 +4,7 @@ module Gitlab ...@@ -4,11 +4,7 @@ module Gitlab
def initialize(project_id, query, repository_ref = nil) def initialize(project_id, query, repository_ref = nil)
@project = Project.find(project_id) @project = Project.find(project_id)
@repository_ref = if repository_ref.present? @repository_ref = repository_ref
repository_ref
else
nil
end
@query = Shellwords.shellescape(query) if query.present? @query = Shellwords.shellescape(query) if query.present?
end end
......
...@@ -14,14 +14,31 @@ describe Mentionable do ...@@ -14,14 +14,31 @@ describe Mentionable do
end end
describe Issue, "Mentionable" do describe Issue, "Mentionable" do
describe :mentioned_users do describe '#mentioned_users' do
let!(:user) { create(:user, username: 'stranger') } let!(:user) { create(:user, username: 'stranger') }
let!(:user2) { create(:user, username: 'john') } let!(:user2) { create(:user, username: 'john') }
let!(:issue) { create(:issue, description: '@stranger mentioned') } let!(:issue) { create(:issue, description: "#{user.to_reference} mentioned") }
subject { issue.mentioned_users } subject { issue.mentioned_users }
it { is_expected.to include(user) } it { is_expected.to include(user) }
it { is_expected.not_to include(user2) } it { is_expected.not_to include(user2) }
end end
describe '#create_cross_references!' do
let(:project) { create(:project) }
let(:author) { double('author') }
let(:commit) { project.commit }
let(:commit2) { project.commit }
let!(:issue) do
create(:issue, project: project, description: commit.to_reference)
end
it 'correctly removes already-mentioned Commits' do
expect(Note).not_to receive(:create_cross_reference_note)
issue.create_cross_references!(project, author, [commit2])
end
end
end end
...@@ -21,8 +21,6 @@ module LoginHelpers ...@@ -21,8 +21,6 @@ module LoginHelpers
# Requires Javascript driver. # Requires Javascript driver.
def logout def logout
within '.logout-holder' do find(:css, ".logout").click
find(:css, ".fa.fa-sign-out").click
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment