@@ -1,7 +1,10 @@
|
||||
Please view this file on the master branch, on stable branches it's out of date.
|
||||
|
||||
v 7.12.0 (unreleased)
|
||||
- Update oauth button logos for Twitter and Google to recommended assets
|
||||
- Update browser gem to version 0.8.0 for IE11 support (Stan Hu)
|
||||
- Fix timeout when rendering file with thousands of lines.
|
||||
- Add "Remember me" checkbox to LDAP signin form.
|
||||
- Don't notify users mentioned in code blocks or blockquotes.
|
||||
- Omit link to generate labels if user does not have access to create them (Stan Hu)
|
||||
- Show warning when a comment will add 10 or more people to the discussion.
|
||||
|
||||
@@ -30,7 +30,7 @@ gem 'rqrcode-rails3'
|
||||
gem 'attr_encrypted', '1.3.4'
|
||||
|
||||
# Browser detection
|
||||
gem "browser"
|
||||
gem "browser", '~> 0.8.0'
|
||||
|
||||
# Extracting information from a git repository
|
||||
# Provide access to Gitlab::Git library
|
||||
@@ -82,7 +82,7 @@ gem "carrierwave"
|
||||
gem 'dropzonejs-rails'
|
||||
|
||||
# for aws storage
|
||||
gem "fog", "~> 1.14"
|
||||
gem "fog", "~> 1.25.0"
|
||||
gem "unf"
|
||||
|
||||
# Authorization
|
||||
@@ -257,10 +257,10 @@ group :development, :test do
|
||||
end
|
||||
|
||||
group :test do
|
||||
gem "simplecov", require: false
|
||||
gem "shoulda-matchers", "~> 2.7.0"
|
||||
gem 'simplecov', require: false
|
||||
gem 'shoulda-matchers', '~> 2.8.0', require: false
|
||||
gem 'email_spec'
|
||||
gem "webmock"
|
||||
gem 'webmock', '~> 1.21.0'
|
||||
gem 'test_after_commit'
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (2.3.1)
|
||||
RedCloth (4.2.9)
|
||||
ace-rails-ap (2.0.1)
|
||||
actionmailer (4.1.9)
|
||||
@@ -35,7 +36,7 @@ GEM
|
||||
tzinfo (~> 1.1)
|
||||
acts-as-taggable-on (3.5.0)
|
||||
activerecord (>= 3.2, < 5)
|
||||
addressable (2.3.5)
|
||||
addressable (2.3.8)
|
||||
annotate (2.6.0)
|
||||
activerecord (>= 2.3.0)
|
||||
rake (>= 0.8.7)
|
||||
@@ -75,7 +76,7 @@ GEM
|
||||
ruby_parser (~> 3.5.0)
|
||||
sass (~> 3.0)
|
||||
terminal-table (~> 1.4)
|
||||
browser (0.7.2)
|
||||
browser (0.8.0)
|
||||
builder (3.2.2)
|
||||
byebug (3.2.0)
|
||||
columnize (~> 0.8)
|
||||
@@ -118,8 +119,8 @@ GEM
|
||||
simplecov (>= 0.7)
|
||||
term-ansicolor
|
||||
thor
|
||||
crack (0.4.1)
|
||||
safe_yaml (~> 0.9.0)
|
||||
crack (0.4.2)
|
||||
safe_yaml (~> 1.0.0)
|
||||
creole (0.3.8)
|
||||
d3_rails (3.5.5)
|
||||
railties (>= 3.1.0)
|
||||
@@ -163,7 +164,7 @@ GEM
|
||||
erubis (2.7.0)
|
||||
escape_utils (0.2.4)
|
||||
eventmachine (1.0.4)
|
||||
excon (0.32.1)
|
||||
excon (0.45.3)
|
||||
execjs (2.5.2)
|
||||
expression_parser (0.9.0)
|
||||
factory_girl (4.3.0)
|
||||
@@ -178,29 +179,69 @@ GEM
|
||||
fastercsv (1.5.5)
|
||||
ffaker (2.0.0)
|
||||
ffi (1.9.8)
|
||||
fog (1.21.0)
|
||||
fog-brightbox
|
||||
fog-core (~> 1.21, >= 1.21.1)
|
||||
fission (0.5.0)
|
||||
CFPropertyList (~> 2.2)
|
||||
fog (1.25.0)
|
||||
fog-brightbox (~> 0.4)
|
||||
fog-core (~> 1.25)
|
||||
fog-json
|
||||
fog-profitbricks
|
||||
fog-radosgw (>= 0.0.2)
|
||||
fog-sakuracloud (>= 0.0.4)
|
||||
fog-softlayer
|
||||
fog-terremark
|
||||
fog-vmfusion
|
||||
fog-voxel
|
||||
fog-xml (~> 0.1.1)
|
||||
ipaddress (~> 0.5)
|
||||
nokogiri (~> 1.5, >= 1.5.11)
|
||||
fog-brightbox (0.0.1)
|
||||
fog-core
|
||||
opennebula
|
||||
fog-brightbox (0.7.1)
|
||||
fog-core (~> 1.22)
|
||||
fog-json
|
||||
fog-core (1.21.1)
|
||||
inflecto (~> 0.0.2)
|
||||
fog-core (1.30.0)
|
||||
builder
|
||||
excon (~> 0.32)
|
||||
formatador (~> 0.2.0)
|
||||
excon (~> 0.45)
|
||||
formatador (~> 0.2)
|
||||
mime-types
|
||||
net-scp (~> 1.1)
|
||||
net-ssh (>= 2.1.3)
|
||||
fog-json (1.0.0)
|
||||
multi_json (~> 1.0)
|
||||
fog-json (1.0.2)
|
||||
fog-core (~> 1.0)
|
||||
multi_json (~> 1.10)
|
||||
fog-profitbricks (0.0.3)
|
||||
fog-core
|
||||
fog-xml
|
||||
nokogiri
|
||||
fog-radosgw (0.0.4)
|
||||
fog-core (>= 1.21.0)
|
||||
fog-json
|
||||
fog-xml (>= 0.0.1)
|
||||
fog-sakuracloud (1.0.1)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-softlayer (0.4.6)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-terremark (0.1.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-vmfusion (0.1.0)
|
||||
fission
|
||||
fog-core
|
||||
fog-voxel (0.1.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-xml (0.1.2)
|
||||
fog-core
|
||||
nokogiri (~> 1.5, >= 1.5.11)
|
||||
font-awesome-rails (4.2.0.0)
|
||||
railties (>= 3.2, < 5.0)
|
||||
foreman (0.63.0)
|
||||
dotenv (>= 0.7)
|
||||
thor (>= 0.13.6)
|
||||
formatador (0.2.4)
|
||||
formatador (0.2.5)
|
||||
gemnasium-gitlab-service (0.2.6)
|
||||
rugged (~> 0.21)
|
||||
gemojione (2.0.0)
|
||||
@@ -288,6 +329,8 @@ GEM
|
||||
i18n (0.7.0)
|
||||
ice_cube (0.11.1)
|
||||
ice_nine (0.10.0)
|
||||
inflecto (0.0.2)
|
||||
ipaddress (0.8.0)
|
||||
jquery-atwho-rails (1.0.1)
|
||||
jquery-rails (3.1.2)
|
||||
railties (>= 3.0, < 5.0)
|
||||
@@ -329,9 +372,9 @@ GEM
|
||||
multipart-post (1.2.0)
|
||||
mysql2 (0.3.16)
|
||||
net-ldap (0.11)
|
||||
net-scp (1.1.2)
|
||||
net-scp (1.2.1)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (2.8.0)
|
||||
net-ssh (2.9.2)
|
||||
newrelic_rpm (3.9.4.245)
|
||||
nokogiri (1.6.6.2)
|
||||
mini_portile (~> 0.6.0)
|
||||
@@ -380,6 +423,10 @@ GEM
|
||||
omniauth-twitter (1.0.1)
|
||||
multi_json (~> 1.3)
|
||||
omniauth-oauth (~> 1.0)
|
||||
opennebula (4.12.1)
|
||||
json
|
||||
nokogiri
|
||||
rbvmomi
|
||||
org-ruby (0.9.12)
|
||||
rubypants (~> 0.2)
|
||||
orm_adapter (0.5.0)
|
||||
@@ -447,6 +494,10 @@ GEM
|
||||
rb-fsevent (0.9.4)
|
||||
rb-inotify (0.9.5)
|
||||
ffi (>= 0.5.0)
|
||||
rbvmomi (1.8.2)
|
||||
builder
|
||||
nokogiri (>= 1.4.1)
|
||||
trollop
|
||||
rdoc (3.12.2)
|
||||
json (~> 1.4)
|
||||
redcarpet (3.2.3)
|
||||
@@ -514,7 +565,7 @@ GEM
|
||||
rubypants (0.2.0)
|
||||
rugged (0.22.2)
|
||||
rugments (1.0.0.beta7)
|
||||
safe_yaml (0.9.7)
|
||||
safe_yaml (1.0.4)
|
||||
sanitize (2.1.0)
|
||||
nokogiri (>= 1.4.4)
|
||||
sass (3.2.19)
|
||||
@@ -536,7 +587,7 @@ GEM
|
||||
thor (~> 0.14)
|
||||
settingslogic (2.0.9)
|
||||
sexp_processor (4.4.5)
|
||||
shoulda-matchers (2.7.0)
|
||||
shoulda-matchers (2.8.0)
|
||||
activesupport (>= 3.0.0)
|
||||
sidekiq (3.3.0)
|
||||
celluloid (>= 0.16.0)
|
||||
@@ -622,6 +673,7 @@ GEM
|
||||
multi_json (~> 1.7)
|
||||
twitter-stream (~> 0.1)
|
||||
tins (0.13.1)
|
||||
trollop (2.1.2)
|
||||
turbolinks (2.5.3)
|
||||
coffee-rails
|
||||
twitter-stream (0.1.16)
|
||||
@@ -653,8 +705,8 @@ GEM
|
||||
equalizer (~> 0.0.7)
|
||||
warden (1.2.3)
|
||||
rack (>= 1.0)
|
||||
webmock (1.16.0)
|
||||
addressable (>= 2.2.7)
|
||||
webmock (1.21.0)
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
websocket-driver (0.3.3)
|
||||
wikicloth (0.8.1)
|
||||
@@ -681,7 +733,7 @@ DEPENDENCIES
|
||||
binding_of_caller
|
||||
bootstrap-sass (~> 3.0)
|
||||
brakeman
|
||||
browser
|
||||
browser (~> 0.8.0)
|
||||
byebug
|
||||
cal-heatmap-rails (~> 0.0.1)
|
||||
capybara (~> 2.2.1)
|
||||
@@ -705,7 +757,7 @@ DEPENDENCIES
|
||||
enumerize
|
||||
factory_girl_rails
|
||||
ffaker (~> 2.0.0)
|
||||
fog (~> 1.14)
|
||||
fog (~> 1.25.0)
|
||||
font-awesome-rails (~> 4.2)
|
||||
foreman
|
||||
gemnasium-gitlab-service (~> 0.2)
|
||||
@@ -775,7 +827,7 @@ DEPENDENCIES
|
||||
seed-fu
|
||||
select2-rails
|
||||
settingslogic
|
||||
shoulda-matchers (~> 2.7.0)
|
||||
shoulda-matchers (~> 2.8.0)
|
||||
sidekiq (~> 3.3)
|
||||
sidetiq (= 0.6.3)
|
||||
simplecov
|
||||
@@ -804,5 +856,5 @@ DEPENDENCIES
|
||||
unicorn-worker-killer
|
||||
version_sorter
|
||||
virtus
|
||||
webmock
|
||||
webmock (~> 1.21.0)
|
||||
wikicloth (= 0.8.1)
|
||||
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 4.7 KiB |
@@ -25,6 +25,7 @@ class @Calendar
|
||||
30
|
||||
]
|
||||
legendCellPadding: 3
|
||||
cellSize: $('.user-calendar').width() / 80
|
||||
onClick: (date, count) ->
|
||||
formated_date = date.getFullYear() + "-" + (date.getMonth()+1) + "-" + date.getDate()
|
||||
$.ajax
|
||||
|
||||
@@ -11,12 +11,6 @@ class @MergeRequest
|
||||
# commits_loaded - Boolean, have commits been pre-rendered server-side?
|
||||
# (default: false)
|
||||
#
|
||||
# check_enable - Boolean, whether to check automerge status
|
||||
# url_to_automerge_check - String, URL to use to check automerge status
|
||||
# current_status - String, current automerge status
|
||||
# ci_enable - Boolean, whether a CI service is enabled
|
||||
# url_to_ci_check - String, URL to use to check CI status
|
||||
#
|
||||
constructor: (@opts) ->
|
||||
@initContextWidget()
|
||||
this.$el = $('.merge-request')
|
||||
@@ -27,14 +21,9 @@ class @MergeRequest
|
||||
this.bindEvents()
|
||||
this.activateTabFromPath()
|
||||
|
||||
this.initMergeWidget()
|
||||
this.$('.show-all-commits').on 'click', =>
|
||||
this.showAllCommits()
|
||||
|
||||
modal = $('#modal_merge_info').modal(show: false)
|
||||
|
||||
disableButtonIfEmptyField '#commit_message', '.accept_merge_request'
|
||||
|
||||
# Prevent duplicate event bindings
|
||||
@disableTaskList()
|
||||
|
||||
@@ -63,20 +52,6 @@ class @MergeRequest
|
||||
$(".context .inline-update").on "change", "#merge_request_assignee_id", ->
|
||||
$(this).submit()
|
||||
|
||||
initMergeWidget: ->
|
||||
this.showState( @opts.current_status )
|
||||
|
||||
if this.$('.automerge_widget').length and @opts.check_enable
|
||||
$.get @opts.url_to_automerge_check, (data) =>
|
||||
this.showState( data.merge_status )
|
||||
, 'json'
|
||||
|
||||
if @opts.ci_enable
|
||||
$.get @opts.url_to_ci_check, (data) =>
|
||||
this.showCiState data.status
|
||||
if data.coverage
|
||||
this.showCiCoverage data.coverage
|
||||
, 'json'
|
||||
|
||||
bindEvents: ->
|
||||
this.$('.merge-request-tabs a[data-toggle="tab"]').on 'shown.bs.tab', (e) =>
|
||||
@@ -92,22 +67,6 @@ class @MergeRequest
|
||||
unless @opts.action == 'new'
|
||||
@setCurrentAction(tab_action)
|
||||
|
||||
this.$('.accept_merge_request').on 'click', ->
|
||||
$('.automerge_widget.can_be_merged').hide()
|
||||
$('.merge-in-progress').show()
|
||||
|
||||
this.$('.remove_source_branch').on 'click', ->
|
||||
$('.remove_source_branch_widget').hide()
|
||||
$('.remove_source_branch_in_progress').show()
|
||||
|
||||
this.$(".remove_source_branch").on "ajax:success", (e, data, status, xhr) ->
|
||||
location.reload()
|
||||
|
||||
this.$(".remove_source_branch").on "ajax:error", (e, data, status, xhr) =>
|
||||
this.$('.remove_source_branch_widget').hide()
|
||||
this.$('.remove_source_branch_in_progress').hide()
|
||||
this.$('.remove_source_branch_widget.failed').show()
|
||||
|
||||
# Activate a tab based on the current URL path
|
||||
#
|
||||
# If the current action is 'show' or 'new' (i.e., initial page load),
|
||||
@@ -157,30 +116,6 @@ class @MergeRequest
|
||||
# See https://github.com/rails/turbolinks/issues/363
|
||||
history.replaceState {turbolinks: true, url: new_state}, '', new_state
|
||||
|
||||
showState: (state) ->
|
||||
$('.automerge_widget').hide()
|
||||
$('.automerge_widget.' + state).show()
|
||||
|
||||
showCiState: (state) ->
|
||||
$('.ci_widget').hide()
|
||||
allowed_states = ["failed", "canceled", "running", "pending", "success"]
|
||||
if state in allowed_states
|
||||
$('.ci_widget.ci-' + state).show()
|
||||
switch state
|
||||
when "failed", "canceled"
|
||||
@setMergeButtonClass('btn-danger')
|
||||
when "running", "pending"
|
||||
@setMergeButtonClass('btn-warning')
|
||||
else
|
||||
$('.ci_widget.ci-error').show()
|
||||
@setMergeButtonClass('btn-danger')
|
||||
|
||||
showCiCoverage: (coverage) ->
|
||||
cov_html = $('<span>')
|
||||
cov_html.addClass('ci-coverage')
|
||||
cov_html.text('Coverage ' + coverage + '%')
|
||||
$('.ci_widget:visible').append(cov_html)
|
||||
|
||||
loadDiff: (event) ->
|
||||
$.ajax
|
||||
type: 'GET'
|
||||
@@ -198,26 +133,6 @@ class @MergeRequest
|
||||
this.$('.first-commits').remove()
|
||||
this.$('.all-commits').removeClass 'hide'
|
||||
|
||||
alreadyOrCannotBeMerged: ->
|
||||
this.$('.automerge_widget').hide()
|
||||
this.$('.merge-in-progress').hide()
|
||||
this.$('.automerge_widget.already_cannot_be_merged').show()
|
||||
|
||||
setMergeButtonClass: (css_class) ->
|
||||
$('.accept_merge_request').removeClass("btn-create").addClass(css_class)
|
||||
|
||||
mergeInProgress: ->
|
||||
$.ajax
|
||||
type: 'GET'
|
||||
url: $('.merge-request').data('url')
|
||||
success: (data) =>
|
||||
switch data.state
|
||||
when 'merged'
|
||||
location.reload()
|
||||
else
|
||||
setTimeout(merge_request.mergeInProgress, 3000)
|
||||
dataType: 'json'
|
||||
|
||||
initTaskList: ->
|
||||
$('.merge-request-details .js-task-list-container').taskList('enable')
|
||||
$(document).on 'tasklist:changed', '.merge-request-details .js-task-list-container', @updateTaskList
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
class @MergeRequestWidget
|
||||
# Initialize MergeRequestWidget behavior
|
||||
#
|
||||
# check_enable - Boolean, whether to check automerge status
|
||||
# url_to_automerge_check - String, URL to use to check automerge status
|
||||
# current_status - String, current automerge status
|
||||
# ci_enable - Boolean, whether a CI service is enabled
|
||||
# url_to_ci_check - String, URL to use to check CI status
|
||||
#
|
||||
constructor: (@opts) ->
|
||||
modal = $('#modal_merge_info').modal(show: false)
|
||||
|
||||
mergeInProgress: ->
|
||||
$.ajax
|
||||
type: 'GET'
|
||||
url: $('.merge-request').data('url')
|
||||
success: (data) =>
|
||||
switch data.state
|
||||
when 'merged'
|
||||
location.reload()
|
||||
else
|
||||
setTimeout(merge_request_widget.mergeInProgress, 3000)
|
||||
dataType: 'json'
|
||||
|
||||
getMergeStatus: ->
|
||||
$.get @opts.url_to_automerge_check, (data) ->
|
||||
$('.mr-state-widget').replaceWith(data)
|
||||
|
||||
getCiStatus: ->
|
||||
if @opts.ci_enable
|
||||
$.get @opts.url_to_ci_check, (data) =>
|
||||
this.showCiState data.status
|
||||
if data.coverage
|
||||
this.showCiCoverage data.coverage
|
||||
, 'json'
|
||||
|
||||
showCiState: (state) ->
|
||||
$('.ci_widget').hide()
|
||||
allowed_states = ["failed", "canceled", "running", "pending", "success"]
|
||||
if state in allowed_states
|
||||
$('.ci_widget.ci-' + state).show()
|
||||
switch state
|
||||
when "failed", "canceled"
|
||||
@setMergeButtonClass('btn-danger')
|
||||
when "running", "pending"
|
||||
@setMergeButtonClass('btn-warning')
|
||||
else
|
||||
$('.ci_widget.ci-error').show()
|
||||
@setMergeButtonClass('btn-danger')
|
||||
|
||||
showCiCoverage: (coverage) ->
|
||||
cov_html = $('<span>')
|
||||
cov_html.addClass('ci-coverage')
|
||||
cov_html.text('Coverage ' + coverage + '%')
|
||||
$('.ci_widget:visible').append(cov_html)
|
||||
|
||||
setMergeButtonClass: (css_class) ->
|
||||
$('.accept_merge_request').removeClass("btn-create").addClass(css_class)
|
||||
@@ -50,7 +50,7 @@ class @ContributorsGraph
|
||||
|
||||
class @ContributorsMasterGraph extends ContributorsGraph
|
||||
constructor: (@data) ->
|
||||
@width = $('.container').width() - 345
|
||||
@width = $('.content').width() - 70
|
||||
@height = 200
|
||||
@x = null
|
||||
@y = null
|
||||
@@ -123,7 +123,7 @@ class @ContributorsMasterGraph extends ContributorsGraph
|
||||
|
||||
class @ContributorsAuthorGraph extends ContributorsGraph
|
||||
constructor: (@data) ->
|
||||
@width = $('.container').width()/2 - 225
|
||||
@width = $('.content').width()/2 - 100
|
||||
@height = 200
|
||||
@x = null
|
||||
@y = null
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* MR -> show: Automerge widget
|
||||
*
|
||||
*/
|
||||
.automerge_widget {
|
||||
.mr-state-widget {
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
.clearfix {
|
||||
|
||||
@@ -5,7 +5,7 @@ class Admin::ProjectsController < Admin::ApplicationController
|
||||
|
||||
def index
|
||||
@projects = Project.all
|
||||
@projects = @projects.where(namespace_id: params[:namespace_id]) if params[:namespace_id].present?
|
||||
@projects = @projects.in_namespace(params[:namespace_id]) if params[:namespace_id].present?
|
||||
@projects = @projects.where("visibility_level IN (?)", params[:visibility_levels]) if params[:visibility_levels].present?
|
||||
@projects = @projects.with_push if params[:with_push].present?
|
||||
@projects = @projects.abandoned if params[:abandoned].present?
|
||||
|
||||
@@ -25,7 +25,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
@user = Gitlab::LDAP::User.new(oauth)
|
||||
@user.save if @user.changed? # will also save new users
|
||||
gl_user = @user.gl_user
|
||||
gl_user.remember_me = true if @user.persisted?
|
||||
gl_user.remember_me = params[:remember_me] if @user.persisted?
|
||||
|
||||
# Do additional LDAP checks for the user filter and EE features
|
||||
if @user.allowed?
|
||||
|
||||
@@ -139,11 +139,13 @@ class Projects::MergeRequestsController < Projects::ApplicationController
|
||||
@merge_request.check_if_can_be_merged
|
||||
end
|
||||
|
||||
render json: { merge_status: @merge_request.automerge_status }
|
||||
closes_issues
|
||||
|
||||
render partial: "projects/merge_requests/widget/show.html.haml", layout: false
|
||||
end
|
||||
|
||||
def automerge
|
||||
return access_denied! unless allowed_to_merge?
|
||||
return access_denied! unless @merge_request.can_be_merged_by?(current_user)
|
||||
|
||||
if @merge_request.automergeable?
|
||||
AutoMergeWorker.perform_async(@merge_request.id, current_user.id, params)
|
||||
@@ -260,8 +262,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
|
||||
@commits = @merge_request.commits
|
||||
|
||||
@merge_request_diff = @merge_request.merge_request_diff
|
||||
@allowed_to_merge = allowed_to_merge?
|
||||
@show_merge_controls = @merge_request.open? && @commits.any? && @allowed_to_merge
|
||||
@source_branch = @merge_request.source_project.repository.find_branch(@merge_request.source_branch).try(:name)
|
||||
|
||||
if @merge_request.locked_long_ago?
|
||||
@@ -270,19 +270,11 @@ class Projects::MergeRequestsController < Projects::ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def allowed_to_merge?
|
||||
allowed_to_push_code?(project, @merge_request.target_branch)
|
||||
end
|
||||
|
||||
def invalid_mr
|
||||
# Render special view for MR with removed source or target branch
|
||||
render 'invalid'
|
||||
end
|
||||
|
||||
def allowed_to_push_code?(project, branch)
|
||||
::Gitlab::GitAccess.new(current_user, project).can_push_to_branch?(branch)
|
||||
end
|
||||
|
||||
def merge_request_params
|
||||
params.require(:merge_request).permit(
|
||||
:title, :assignee_id, :source_project_id, :source_branch,
|
||||
|
||||
@@ -2,8 +2,6 @@ class Projects::ProjectMembersController < Projects::ApplicationController
|
||||
# Authorize
|
||||
before_action :authorize_admin_project!, except: :leave
|
||||
|
||||
layout "project_settings"
|
||||
|
||||
def index
|
||||
@project_members = @project.project_members
|
||||
@project_members = @project_members.non_invite unless can?(current_user, :admin_project, @project)
|
||||
|
||||
@@ -89,7 +89,7 @@ module TabHelper
|
||||
def project_tab_class
|
||||
return "active" if current_page?(controller: "/projects", action: :edit, id: @project)
|
||||
|
||||
if ['services', 'git_hooks', 'hooks', 'deploy_keys', 'project_members', 'protected_branches'].include? controller.controller_name
|
||||
if ['services', 'hooks', 'deploy_keys', 'protected_branches', 'git_hooks'].include? controller.controller_name
|
||||
"active"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -172,10 +172,8 @@ class Commit
|
||||
@raw.send(m, *args, &block)
|
||||
end
|
||||
|
||||
def respond_to?(method)
|
||||
return true if @raw.respond_to?(method)
|
||||
|
||||
super
|
||||
def respond_to_missing?(method, include_private = false)
|
||||
@raw.respond_to?(method, include_private) || super
|
||||
end
|
||||
|
||||
# Truncate sha to 8 characters
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
require 'task_list'
|
||||
require 'task_list/filter'
|
||||
|
||||
# Contains functionality for objects that can have task lists in their
|
||||
# descriptions. Task list items can be added with Markdown like "* [x] Fix
|
||||
|
||||
@@ -433,4 +433,16 @@ class MergeRequest < ActiveRecord::Base
|
||||
def approved_by_users
|
||||
approvals.map(&:user)
|
||||
end
|
||||
|
||||
def has_ci?
|
||||
source_project.ci_service && commits.any?
|
||||
end
|
||||
|
||||
def branch_missing?
|
||||
!source_branch_exists? || !target_branch_exists?
|
||||
end
|
||||
|
||||
def can_be_merged_by?(user)
|
||||
::Gitlab::GitAccess.new(user, project).can_push_to_branch?(target_branch)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -164,7 +164,7 @@ class Project < ActiveRecord::Base
|
||||
scope :without_user, ->(user) { where('projects.id NOT IN (:ids)', ids: user.authorized_projects.map(&:id) ) }
|
||||
scope :without_team, ->(team) { team.projects.present? ? where('projects.id NOT IN (:ids)', ids: team.projects.map(&:id)) : scoped }
|
||||
scope :not_in_group, ->(group) { where('projects.id NOT IN (:ids)', ids: group.project_ids ) }
|
||||
scope :in_namespace, ->(namespace) { where(namespace_id: namespace.id) }
|
||||
scope :in_namespace, ->(namespace_ids) { where(namespace_id: namespace_ids) }
|
||||
scope :in_group_namespace, -> { joins(:group) }
|
||||
scope :personal, ->(user) { where(namespace_id: user.namespace_id) }
|
||||
scope :joined, ->(user) { where('namespace_id != ?', user.namespace_id) }
|
||||
|
||||
@@ -163,10 +163,8 @@ class Repository
|
||||
end
|
||||
end
|
||||
|
||||
def respond_to?(method)
|
||||
return true if raw_repository.respond_to?(method)
|
||||
|
||||
super
|
||||
def respond_to_missing?(method, include_private = false)
|
||||
raw_repository.respond_to?(method, include_private) || super
|
||||
end
|
||||
|
||||
def blob_at(sha, path)
|
||||
|
||||
@@ -381,9 +381,11 @@ class User < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def owned_projects
|
||||
@owned_projects ||= begin
|
||||
Project.where(namespace_id: owned_groups.pluck(:id).push(namespace.id)).joins(:namespace)
|
||||
end
|
||||
@owned_projects ||=
|
||||
begin
|
||||
namespace_ids = owned_groups.pluck(:id).push(namespace.id)
|
||||
Project.in_namespace(namespace_ids).joins(:namespace)
|
||||
end
|
||||
end
|
||||
|
||||
# Team membership in authorized projects
|
||||
|
||||
@@ -9,7 +9,7 @@ module Search
|
||||
def execute
|
||||
group = Group.find_by(id: params[:group_id]) if params[:group_id].present?
|
||||
projects = ProjectsFinder.new.execute(current_user)
|
||||
projects = projects.where(namespace_id: group.id) if group
|
||||
projects = projects.in_namespace(group.id) if group
|
||||
project_ids = projects.pluck(:id)
|
||||
|
||||
Gitlab::SearchResults.new(project_ids, params[:search])
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
%li.pull-right
|
||||
= link_to dashboard_path(:atom, { private_token: current_user.private_token }), class: 'rss-btn' do
|
||||
%i.fa.fa-rss
|
||||
Activity Feed
|
||||
|
||||
= render 'shared/event_filter'
|
||||
%hr
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
= form_tag(user_omniauth_callback_path(server['provider_name']), id: 'new_ldap_user' ) do
|
||||
= text_field_tag :username, nil, {class: "form-control top", placeholder: "#{server['label']} Login", autofocus: "autofocus"}
|
||||
= password_field_tag :password, nil, {class: "form-control bottom", placeholder: "Password"}
|
||||
- if devise_mapping.rememberable?
|
||||
.remember-me.checkbox
|
||||
%label{for: "remember_me"}
|
||||
= check_box_tag :remember_me, '1', false, id: 'remember_me'
|
||||
%span Remember me
|
||||
= button_tag "#{server['label']} Sign in", class: "btn-save btn"
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
%li
|
||||
= link_to group_path(@group, { format: :atom, private_token: current_user.private_token }), title: "Feed", class: 'rss-btn' do
|
||||
%i.fa.fa-rss
|
||||
Activity Feed
|
||||
|
||||
= render 'shared/event_filter'
|
||||
%hr
|
||||
|
||||
@@ -56,6 +56,13 @@
|
||||
Merge Requests
|
||||
%span.count.merge_counter= @project.merge_requests.opened.count
|
||||
|
||||
- if project_nav_tab? :settings
|
||||
= nav_link(controller: [:project_members, :teams]) do
|
||||
= link_to namespace_project_project_members_path(@project.namespace, @project), title: 'Members', class: 'team-tab tab', data: {placement: 'right'} do
|
||||
= icon('users fw')
|
||||
%span
|
||||
Members
|
||||
|
||||
- if project_nav_tab? :labels
|
||||
= nav_link(controller: :labels) do
|
||||
= link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels', data: {placement: 'right'} do
|
||||
|
||||
@@ -10,14 +10,9 @@
|
||||
%ul.project-settings-nav.sidebar-subnav
|
||||
= nav_link(path: 'projects#edit') do
|
||||
= link_to edit_project_path(@project), title: 'Project', class: 'stat-tab tab', data: {placement: 'right'} do
|
||||
= icon('pencil-square-o')
|
||||
= icon('pencil-square-o fw')
|
||||
%span
|
||||
Project Settings
|
||||
= nav_link(controller: [:project_members, :teams]) do
|
||||
= link_to namespace_project_project_members_path(@project.namespace, @project), title: 'Members', class: 'team-tab tab', data: {placement: 'right'} do
|
||||
= icon('users')
|
||||
%span
|
||||
Members
|
||||
= nav_link(controller: :group_links) do
|
||||
= link_to namespace_project_group_links_path(@project.namespace, @project) do
|
||||
%i.fa.fa-share-square-o
|
||||
@@ -25,12 +20,12 @@
|
||||
Groups
|
||||
= nav_link(controller: :deploy_keys) do
|
||||
= link_to namespace_project_deploy_keys_path(@project.namespace, @project), title: 'Deploy Keys', data: {placement: 'right'} do
|
||||
= icon('key')
|
||||
= icon('key fw')
|
||||
%span
|
||||
Deploy Keys
|
||||
= nav_link(controller: :hooks) do
|
||||
= link_to namespace_project_hooks_path(@project.namespace, @project), title: 'Web Hooks', data: {placement: 'right'} do
|
||||
= icon('link')
|
||||
= icon('link fw')
|
||||
%span
|
||||
Web Hooks
|
||||
= nav_link(controller: :git_hooks) do
|
||||
@@ -40,12 +35,12 @@
|
||||
Git Hooks
|
||||
= nav_link(controller: :services) do
|
||||
= link_to namespace_project_services_path(@project.namespace, @project), title: 'Services', data: {placement: 'right'} do
|
||||
= icon('cogs')
|
||||
= icon('cogs fw')
|
||||
%span
|
||||
Services
|
||||
= nav_link(controller: :protected_branches) do
|
||||
= link_to namespace_project_protected_branches_path(@project.namespace, @project), title: 'Protected Branches', data: {placement: 'right'} do
|
||||
= icon('lock')
|
||||
= icon('lock fw')
|
||||
%span
|
||||
Protected branches
|
||||
= nav_link(controller: :audit_events) do
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
|
||||
%h2.page-title Two-Factor Authentication (2FA)
|
||||
%p
|
||||
Download the Google Authenticator application from App Store for iOS or
|
||||
Google Play for Android and scan this code.
|
||||
Download the Google Authenticator application from App Store for iOS or Google
|
||||
Play for Android and scan this code.
|
||||
|
||||
More information is available in the #{link_to('documentation', help_page_path('workflow', 'two_factor_authentication'))}.
|
||||
|
||||
%hr
|
||||
|
||||
@@ -12,10 +14,9 @@
|
||||
.alert.alert-danger
|
||||
= @error
|
||||
.form-group
|
||||
.col-sm-2
|
||||
.col-sm-2
|
||||
.col-lg-2.col-lg-offset-2
|
||||
= raw @qr_code
|
||||
.col-sm-8.manual-instructions
|
||||
.col-lg-7.col-lg-offset-1.manual-instructions
|
||||
%h3 Can't scan the code?
|
||||
|
||||
%p
|
||||
@@ -33,7 +34,7 @@
|
||||
%dd Yes
|
||||
.form-group
|
||||
= label_tag :pin_code, nil, class: "control-label"
|
||||
.col-sm-10
|
||||
.col-lg-10
|
||||
= text_field_tag :pin_code, nil, class: "form-control", required: true, autofocus: true
|
||||
.form-actions
|
||||
= submit_tag 'Submit', class: 'btn btn-success'
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
.md-header.clearfix
|
||||
%ul.nav.nav-tabs
|
||||
%li.active
|
||||
= link_to '#md-write-holder', class: 'js-md-write-button' do
|
||||
= link_to '#md-write-holder', class: 'js-md-write-button', tabindex: '-1' do
|
||||
Write
|
||||
%li
|
||||
= link_to '#md-preview-holder', class: 'js-md-preview-button' do
|
||||
= link_to '#md-preview-holder', class: 'js-md-preview-button', tabindex: '-1' do
|
||||
Preview
|
||||
|
||||
- if defined?(referenced_users) && referenced_users
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
%li
|
||||
= link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "Feed", class: 'rss-btn' do
|
||||
%i.fa.fa-rss
|
||||
Activity Feed
|
||||
|
||||
= render 'shared/event_filter'
|
||||
%hr
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Project settings
|
||||
%hr
|
||||
.panel-body
|
||||
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit_project form-horizontal" }, authenticity_token: true do |f|
|
||||
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit_project form-horizontal fieldset-form" }, authenticity_token: true do |f|
|
||||
|
||||
%fieldset
|
||||
.form-group.project_name_holder
|
||||
@@ -41,32 +41,40 @@
|
||||
%legend
|
||||
Features:
|
||||
.form-group
|
||||
= f.label :issues_enabled, "Issues", class: 'control-label'
|
||||
.col-sm-10
|
||||
.col-sm-offset-2.col-sm-10
|
||||
.checkbox
|
||||
= f.check_box :issues_enabled
|
||||
%span.descr Lightweight issue tracking system for this project
|
||||
= f.label :issues_enabled do
|
||||
= f.check_box :issues_enabled
|
||||
%strong Issues
|
||||
%br
|
||||
%span.descr Lightweight issue tracking system for this project
|
||||
|
||||
.form-group
|
||||
= f.label :merge_requests_enabled, "Merge Requests", class: 'control-label'
|
||||
.col-sm-10
|
||||
.col-sm-offset-2.col-sm-10
|
||||
.checkbox
|
||||
= f.check_box :merge_requests_enabled
|
||||
%span.descr Submit changes to be merged upstream.
|
||||
= f.label :merge_requests_enabled do
|
||||
= f.check_box :merge_requests_enabled
|
||||
%strong Merge Requests
|
||||
%br
|
||||
%span.descr Submit changes to be merged upstream.
|
||||
|
||||
.form-group
|
||||
= f.label :wiki_enabled, "Wiki", class: 'control-label'
|
||||
.col-sm-10
|
||||
.col-sm-offset-2.col-sm-10
|
||||
.checkbox
|
||||
= f.check_box :wiki_enabled
|
||||
%span.descr Pages for project documentation
|
||||
= f.label :wiki_enabled do
|
||||
= f.check_box :wiki_enabled
|
||||
%strong Wiki
|
||||
%br
|
||||
%span.descr Pages for project documentation
|
||||
|
||||
.form-group
|
||||
= f.label :snippets_enabled, "Snippets", class: 'control-label'
|
||||
.col-sm-10
|
||||
.col-sm-offset-2.col-sm-10
|
||||
.checkbox
|
||||
= f.check_box :snippets_enabled
|
||||
%span.descr Share code pastes with others out of git repository
|
||||
= f.label :snippets_enabled do
|
||||
= f.check_box :snippets_enabled
|
||||
%strong Snippets
|
||||
%br
|
||||
%span.descr Share code pastes with others out of git repository
|
||||
|
||||
= render 'merge_request_settings', f: f
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
%li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff)
|
||||
|
||||
= render "projects/merge_requests/show/how_to_merge"
|
||||
= render "projects/merge_requests/show/state_widget"
|
||||
= render "projects/merge_requests/widget/show.html.haml"
|
||||
|
||||
- if @commits.present?
|
||||
%ul.nav.nav-tabs.merge-request-tabs
|
||||
@@ -69,10 +69,5 @@
|
||||
var merge_request;
|
||||
|
||||
merge_request = new MergeRequest({
|
||||
url_to_automerge_check: "#{automerge_check_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)}",
|
||||
check_enable: #{@merge_request.unchecked? ? "true" : "false"},
|
||||
url_to_ci_check: "#{ci_status_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)}",
|
||||
ci_enable: #{@project.ci_service ? "true" : "false"},
|
||||
current_status: "#{@merge_request.automerge_status}",
|
||||
action: "#{controller.action_name}"
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-if @status
|
||||
- if @status
|
||||
:plain
|
||||
merge_request.mergeInProgress();
|
||||
-else
|
||||
merge_request_widget.mergeInProgress();
|
||||
- else
|
||||
:plain
|
||||
merge_request.alreadyOrCannotBeMerged()
|
||||
$('.mr-widget-body').html("#{escape_javascript(render('projects/merge_requests/widget/open/reload'))}");
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
.clearfix
|
||||
- unless @merge_request.approved_by?(current_user)
|
||||
.append-bottom-10
|
||||
= form_for [:approve, @project.namespace.becomes(Namespace), @project, @merge_request], method: :post do |f|
|
||||
= f.submit "Approve Merge Request", class: "btn btn-reopen approve-btn"
|
||||
%p This merge request must be approved by #{pluralize(@merge_request.approvals_required, 'user')} before it can be merged
|
||||
@@ -1,102 +0,0 @@
|
||||
- unless @allowed_to_merge
|
||||
- if @project.archived?
|
||||
%p
|
||||
%strong Archived projects do not provide commit access.
|
||||
- else
|
||||
.automerge_widget.cannot_be_merged.hide
|
||||
%strong This merge request contains merge conflicts that must be resolved.
|
||||
Only those with write access to this repository can merge merge requests.
|
||||
.automerge_widget.work_in_progress.hide
|
||||
%strong This merge request is marked as Work In Progress.
|
||||
Only those with write access to this repository can merge merge requests.
|
||||
.automerge_widget.can_be_merged.hide
|
||||
%strong This request can be merged automatically.
|
||||
Only those with write access to this repository can merge merge requests.
|
||||
|
||||
|
||||
- if @show_merge_controls
|
||||
.automerge_widget.can_be_merged.hide
|
||||
.clearfix
|
||||
- if @merge_request.requires_approve? && !@merge_request.approved?
|
||||
= render 'projects/merge_requests/show/approve'
|
||||
- else
|
||||
= form_for [:automerge, @project.namespace.becomes(Namespace), @project, @merge_request], remote: true, method: :post do |f|
|
||||
.accept-merge-holder.clearfix.js-toggle-container
|
||||
.accept-action
|
||||
= f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request"
|
||||
- if can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && !@merge_request.for_fork?
|
||||
.accept-control.checkbox
|
||||
= label_tag :should_remove_source_branch, class: "remove_source_checkbox" do
|
||||
= check_box_tag :should_remove_source_branch
|
||||
Remove source-branch
|
||||
- if @merge_request.target_project.merge_requests_rebase_enabled && can_rebase?(@merge_request.target_project, @merge_request.target_branch)
|
||||
.accept-control.remove_branch_holder
|
||||
= label_tag :should_rebase, class: "checkbox" do
|
||||
= check_box_tag :should_rebase, "1", @project.merge_requests_rebase_default
|
||||
Rebase before merge
|
||||
.accept-control
|
||||
= link_to "#", class: "modify-merge-commit-link js-toggle-button", title: "Modify merge commit message" do
|
||||
%i.fa.fa-edit
|
||||
Modify commit message
|
||||
.js-toggle-content.hide.prepend-top-20
|
||||
= render 'shared/commit_message_container', params: params,
|
||||
text: @merge_request.merge_commit_message,
|
||||
rows: 14, hint: true
|
||||
|
||||
%br
|
||||
.light
|
||||
If you want to merge this request manually, you can use the
|
||||
%strong
|
||||
= link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
|
||||
|
||||
- if @merge_request.approvals.any?
|
||||
.approved-by-users
|
||||
Approved by
|
||||
- @merge_request.approved_by_users.each do |user|
|
||||
= link_to_member(@project, user, name: false, size: 24)
|
||||
|
||||
.automerge_widget.no_satellite.hide
|
||||
%p
|
||||
%span
|
||||
%strong This repository does not have a satellite. Please ask an administrator to fix this issue!
|
||||
|
||||
.automerge_widget.cannot_be_merged.hide
|
||||
%h4
|
||||
This merge request contains merge conflicts that must be resolved.
|
||||
You can try it manually on the
|
||||
%strong
|
||||
= link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
|
||||
|
||||
%p
|
||||
%button.btn.disabled{:type => 'button'}
|
||||
%i.fa.fa-warning
|
||||
Accept Merge Request
|
||||
|
||||
This happens when Git is not able to automatically resolve conflicts between branches.
|
||||
|
||||
.automerge_widget.work_in_progress.hide
|
||||
%h4
|
||||
This merge request cannot be accepted because it is marked as Work In Progress.
|
||||
|
||||
%p
|
||||
%button.btn.disabled{:type => 'button'}
|
||||
%i.fa.fa-warning
|
||||
Accept Merge Request
|
||||
|
||||
When the merge request is ready, remove the "WIP" prefix from the title to allow it to be accepted.
|
||||
|
||||
.automerge_widget.unchecked
|
||||
%p
|
||||
%strong
|
||||
%i.fa.fa-spinner.fa-spin
|
||||
Checking automatic merge…
|
||||
|
||||
.automerge_widget.already_cannot_be_merged.hide
|
||||
%p
|
||||
%strong This merge request cannot be merged. Try to reload the page.
|
||||
|
||||
.merge-in-progress.hide
|
||||
%p
|
||||
%i.fa.fa-spinner.fa-spin
|
||||
|
||||
Merge is in progress. Please wait… Page will be reloaded automatically.
|
||||
@@ -1,34 +0,0 @@
|
||||
- if @commits.any?
|
||||
.ci_widget.ci-success{style: "display:none"}
|
||||
= icon("check")
|
||||
%span CI build passed
|
||||
for #{@merge_request.last_commit_short_sha}.
|
||||
= link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
|
||||
|
||||
|
||||
.ci_widget.ci-failed{style: "display:none"}
|
||||
= icon("times")
|
||||
%span CI build failed
|
||||
for #{@merge_request.last_commit_short_sha}.
|
||||
= link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
|
||||
|
||||
- [:running, :pending].each do |status|
|
||||
.ci_widget{class: "ci-#{status}", style: "display:none"}
|
||||
= icon("clock-o")
|
||||
%span CI build #{status}
|
||||
for #{@merge_request.last_commit_short_sha}.
|
||||
= link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
|
||||
|
||||
.ci_widget
|
||||
= icon("spinner spin")
|
||||
Checking for CI status for #{@merge_request.last_commit_short_sha}
|
||||
|
||||
.ci_widget.ci-canceled{style: "display:none"}
|
||||
= icon("times")
|
||||
%span CI build canceled
|
||||
for #{@merge_request.last_commit_short_sha}.
|
||||
= link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
|
||||
|
||||
.ci_widget.ci-error{style: "display:none"}
|
||||
= icon("times")
|
||||
%span Cannot connect to the CI server. Please check your settings and try again.
|
||||
@@ -1,17 +0,0 @@
|
||||
- if @source_branch.blank?
|
||||
Source branch has been removed
|
||||
|
||||
- elsif can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && @merge_request.merged?
|
||||
.remove_source_branch_widget
|
||||
%p Changes merged into #{@merge_request.target_branch}. You can remove source branch now
|
||||
= link_to namespace_project_branch_path(@merge_request.source_project.namespace, @merge_request.source_project, @source_branch), remote: true, method: :delete, class: "btn btn-primary btn-sm remove_source_branch" do
|
||||
%i.fa.fa-times
|
||||
Remove Source Branch
|
||||
|
||||
.remove_source_branch_widget.failed.hide
|
||||
Failed to remove source branch '#{@merge_request.source_branch}'
|
||||
|
||||
.remove_source_branch_in_progress.hide
|
||||
%i.fa.fa-spinner.fa-spin
|
||||
|
||||
Removing source branch '#{@merge_request.source_branch}'. Please wait. Page will be automatically reloaded.
|
||||
@@ -1,50 +0,0 @@
|
||||
.mr-state-widget
|
||||
- if @merge_request.source_project.ci_service && @commits.any?
|
||||
.mr-widget-heading
|
||||
= render "projects/merge_requests/show/mr_ci"
|
||||
.mr-widget-body
|
||||
- if @merge_request.open?
|
||||
- if @merge_request.source_branch_exists? && @merge_request.target_branch_exists?
|
||||
= render "projects/merge_requests/show/mr_accept"
|
||||
- else
|
||||
= render "projects/merge_requests/show/no_accept"
|
||||
|
||||
- if @merge_request.closed?
|
||||
%h4
|
||||
Rejected
|
||||
- if @merge_request.closed_event
|
||||
by #{link_to_member(@project, @merge_request.closed_event.author, avatar: true)}
|
||||
#{time_ago_with_tooltip(@merge_request.closed_event.created_at)}
|
||||
%p Changes were not merged into target branch
|
||||
|
||||
- if @merge_request.merged?
|
||||
%h4
|
||||
Accepted
|
||||
- if @merge_request.merge_event
|
||||
by #{link_to_member(@project, @merge_request.merge_event.author, avatar: true)}
|
||||
#{time_ago_with_tooltip(@merge_request.merge_event.created_at)}
|
||||
= render "projects/merge_requests/show/remove_source_branch"
|
||||
|
||||
- if @merge_request.locked?
|
||||
%h4
|
||||
Merge in progress...
|
||||
%p
|
||||
Merging is in progress. While merging this request is locked and cannot be closed.
|
||||
|
||||
- unless @commits.any?
|
||||
%h4 Nothing to merge
|
||||
%p
|
||||
Nothing to merge from
|
||||
%span.label-branch #{@merge_request.source_branch}
|
||||
to
|
||||
%span.label-branch #{@merge_request.target_branch}
|
||||
%br
|
||||
Try to use different branches or push new code.
|
||||
|
||||
- if @closes_issues.present? && @merge_request.open?
|
||||
.mr-widget-footer
|
||||
%span
|
||||
%i.fa.fa-check
|
||||
Accepting this merge request will close #{@closes_issues.size == 1 ? 'issue' : 'issues'}
|
||||
= succeed '.' do
|
||||
!= gfm(issues_sentence(@closes_issues))
|
||||
@@ -0,0 +1,9 @@
|
||||
.mr-state-widget
|
||||
= render 'projects/merge_requests/widget/heading'
|
||||
.mr-widget-body
|
||||
%h4
|
||||
Rejected
|
||||
- if @merge_request.closed_event
|
||||
by #{link_to_member(@project, @merge_request.closed_event.author, avatar: true)}
|
||||
#{time_ago_with_tooltip(@merge_request.closed_event.created_at)}
|
||||
%p Changes were not merged into target branch
|
||||
@@ -0,0 +1,38 @@
|
||||
- if @merge_request.has_ci?
|
||||
.mr-widget-heading
|
||||
.ci_widget.ci-success{style: "display:none"}
|
||||
= icon("check")
|
||||
%span CI build passed
|
||||
for #{@merge_request.last_commit_short_sha}.
|
||||
= link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
|
||||
|
||||
.ci_widget.ci-failed{style: "display:none"}
|
||||
= icon("times")
|
||||
%span CI build failed
|
||||
for #{@merge_request.last_commit_short_sha}.
|
||||
= link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
|
||||
|
||||
- [:running, :pending].each do |status|
|
||||
.ci_widget{class: "ci-#{status}", style: "display:none"}
|
||||
= icon("clock-o")
|
||||
%span CI build #{status}
|
||||
for #{@merge_request.last_commit_short_sha}.
|
||||
= link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
|
||||
|
||||
.ci_widget
|
||||
= icon("spinner spin")
|
||||
Checking for CI status for #{@merge_request.last_commit_short_sha}
|
||||
|
||||
.ci_widget.ci-canceled{style: "display:none"}
|
||||
= icon("times")
|
||||
%span CI build canceled
|
||||
for #{@merge_request.last_commit_short_sha}.
|
||||
= link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
|
||||
|
||||
.ci_widget.ci-error{style: "display:none"}
|
||||
= icon("times")
|
||||
%span Cannot connect to the CI server. Please check your settings and try again.
|
||||
|
||||
:coffeescript
|
||||
$ ->
|
||||
merge_request_widget.getCiStatus()
|
||||
@@ -0,0 +1,8 @@
|
||||
.mr-state-widget
|
||||
= render 'projects/merge_requests/widget/heading'
|
||||
.mr-widget-body
|
||||
%h4
|
||||
Merge in progress...
|
||||
%p
|
||||
Merging is in progress. While merging this request is locked and cannot be closed.
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
.mr-state-widget
|
||||
= render 'projects/merge_requests/widget/heading'
|
||||
.mr-widget-body
|
||||
%h4
|
||||
Accepted
|
||||
- if @merge_request.merge_event
|
||||
by #{link_to_member(@project, @merge_request.merge_event.author, avatar: true)}
|
||||
#{time_ago_with_tooltip(@merge_request.merge_event.created_at)}
|
||||
%div
|
||||
- if @source_branch.blank?
|
||||
Source branch has been removed
|
||||
|
||||
- elsif can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && @merge_request.merged?
|
||||
.remove_source_branch_widget
|
||||
%p Changes merged into #{@merge_request.target_branch}. You can remove source branch now
|
||||
= link_to namespace_project_branch_path(@merge_request.source_project.namespace, @merge_request.source_project, @source_branch), remote: true, method: :delete, class: "btn btn-primary btn-sm remove_source_branch" do
|
||||
%i.fa.fa-times
|
||||
Remove Source Branch
|
||||
|
||||
.remove_source_branch_widget.failed.hide
|
||||
Failed to remove source branch '#{@merge_request.source_branch}'
|
||||
|
||||
.remove_source_branch_in_progress.hide
|
||||
%i.fa.fa-spinner.fa-spin
|
||||
|
||||
Removing source branch '#{@merge_request.source_branch}'. Please wait. Page will be automatically reloaded.
|
||||
|
||||
:coffeescript
|
||||
$('.remove_source_branch').on 'click', ->
|
||||
$('.remove_source_branch_widget').hide()
|
||||
$('.remove_source_branch_in_progress').show()
|
||||
|
||||
$(".remove_source_branch").on "ajax:success", (e, data, status, xhr) ->
|
||||
location.reload()
|
||||
|
||||
$(".remove_source_branch").on "ajax:error", (e, data, status, xhr) ->
|
||||
$('.remove_source_branch_widget').hide()
|
||||
$('.remove_source_branch_in_progress').hide()
|
||||
$('.remove_source_branch_widget.failed').show()
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
.mr-state-widget
|
||||
= render 'projects/merge_requests/widget/heading'
|
||||
.mr-widget-body
|
||||
- if @project.archived?
|
||||
= render 'projects/merge_requests/widget/open/archived'
|
||||
- elsif !@project.satellite.exists?
|
||||
= render 'projects/merge_requests/widget/open/no_satellite'
|
||||
- elsif @merge_request.commits.blank?
|
||||
= render 'projects/merge_requests/widget/open/nothing'
|
||||
- elsif @merge_request.branch_missing?
|
||||
= render 'projects/merge_requests/widget/open/missing_branch'
|
||||
- elsif @merge_request.unchecked?
|
||||
= render 'projects/merge_requests/widget/open/check'
|
||||
- elsif @merge_request.cannot_be_merged?
|
||||
= render 'projects/merge_requests/widget/open/conflicts'
|
||||
- elsif @merge_request.work_in_progress?
|
||||
= render 'projects/merge_requests/widget/open/wip'
|
||||
- elsif !@merge_request.can_be_merged_by?(current_user)
|
||||
= render 'projects/merge_requests/widget/open/not_allowed'
|
||||
- elsif @merge_request.requires_approve? && !@merge_request.approved?
|
||||
= render 'projects/merge_requests/widget/open/approve'
|
||||
- elsif @merge_request.can_be_merged?
|
||||
= render 'projects/merge_requests/widget/open/accept'
|
||||
|
||||
- if @closes_issues.present?
|
||||
.mr-widget-footer
|
||||
%span
|
||||
%i.fa.fa-check
|
||||
Accepting this merge request will close #{@closes_issues.size == 1 ? 'issue' : 'issues'}
|
||||
= succeed '.' do
|
||||
!= gfm(issues_sentence(@closes_issues))
|
||||
@@ -0,0 +1,20 @@
|
||||
- if @merge_request.open?
|
||||
= render 'projects/merge_requests/widget/open'
|
||||
- elsif @merge_request.merged?
|
||||
= render 'projects/merge_requests/widget/merged'
|
||||
- elsif @merge_request.closed?
|
||||
= render 'projects/merge_requests/widget/closed'
|
||||
- elsif @merge_request.locked?
|
||||
= render 'projects/merge_requests/widget/locked'
|
||||
|
||||
:javascript
|
||||
var merge_request_widget;
|
||||
|
||||
merge_request_widget = new MergeRequestWidget({
|
||||
url_to_automerge_check: "#{automerge_check_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)}",
|
||||
check_enable: #{@merge_request.unchecked? ? "true" : "false"},
|
||||
url_to_ci_check: "#{ci_status_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)}",
|
||||
ci_enable: #{@project.ci_service ? "true" : "false"},
|
||||
current_status: "#{@merge_request.automerge_status}",
|
||||
});
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
= form_for [:automerge, @project.namespace.becomes(Namespace), @project, @merge_request], remote: true, method: :post, html: { class: 'accept-mr-form' } do |f|
|
||||
= hidden_field_tag :authenticity_token, form_authenticity_token
|
||||
.accept-merge-holder.clearfix.js-toggle-container
|
||||
.accept-action
|
||||
= f.button class: "btn btn-create accept_merge_request" do
|
||||
Accept Merge Request
|
||||
- if can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && !@merge_request.for_fork?
|
||||
.accept-control.checkbox
|
||||
= label_tag :should_remove_source_branch, class: "remove_source_checkbox" do
|
||||
= check_box_tag :should_remove_source_branch
|
||||
Remove source-branch
|
||||
.accept-control
|
||||
= link_to "#", class: "modify-merge-commit-link js-toggle-button", title: "Modify merge commit message" do
|
||||
%i.fa.fa-edit
|
||||
Modify commit message
|
||||
.js-toggle-content.hide.prepend-top-20
|
||||
= render 'shared/commit_message_container', params: params,
|
||||
text: @merge_request.merge_commit_message,
|
||||
rows: 14, hint: true
|
||||
|
||||
%br
|
||||
.light
|
||||
If you want to merge this request manually, you can use the
|
||||
%strong
|
||||
= link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
|
||||
|
||||
- if @merge_request.approvals.any?
|
||||
.approved-by-users
|
||||
Approved by
|
||||
- @merge_request.approved_by_users.each do |user|
|
||||
= link_to_member(@project, user, name: false, size: 24)
|
||||
|
||||
:coffeescript
|
||||
disableButtonIfEmptyField '#commit_message', '.accept_merge_request'
|
||||
|
||||
$('.accept-mr-form').on 'ajax:before', ->
|
||||
btn = $('.accept_merge_request')
|
||||
btn.disable()
|
||||
btn.html("<i class='fa fa-spinner fa-spin'></i> Merge in progress")
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
%div
|
||||
- unless @merge_request.approved_by?(current_user)
|
||||
.append-bottom-10
|
||||
= form_for [:approve, @project.namespace.becomes(Namespace), @project, @merge_request], method: :post do |f|
|
||||
= f.submit "Approve Merge Request", class: "btn btn-reopen approve-btn"
|
||||
|
||||
%p This merge request must be approved by #{pluralize(@merge_request.approvals_required, 'user')} before it can be merged
|
||||
|
||||
- if @merge_request.approvals.any?
|
||||
.approved-by-users
|
||||
Approved by
|
||||
- @merge_request.approved_by_users.each do |user|
|
||||
= link_to_member(@project, user, name: false, size: 24)
|
||||
@@ -0,0 +1,2 @@
|
||||
%p
|
||||
%strong Archived projects do not provide commit access.
|
||||
@@ -0,0 +1,7 @@
|
||||
%strong
|
||||
%i.fa.fa-spinner.fa-spin
|
||||
Checking automatic merge…
|
||||
|
||||
:coffeescript
|
||||
$ ->
|
||||
merge_request_widget.getMergeStatus()
|
||||
@@ -0,0 +1,9 @@
|
||||
- if @merge_request.can_be_merged_by?(current_user)
|
||||
%h4
|
||||
This merge request contains merge conflicts that must be resolved.
|
||||
You can try it manually on the
|
||||
%strong
|
||||
= link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
|
||||
- else
|
||||
%strong This merge request contains merge conflicts that must be resolved.
|
||||
Only those with write access to this repository can merge merge requests.
|
||||
@@ -0,0 +1,3 @@
|
||||
%p
|
||||
%span
|
||||
%strong This repository does not have a satellite. Please ask an administrator to fix this issue!
|
||||
@@ -0,0 +1,2 @@
|
||||
%strong This request can be merged automatically.
|
||||
Only those with write access to this repository can merge merge requests.
|
||||
@@ -0,0 +1,8 @@
|
||||
%h4 Nothing to merge
|
||||
%p
|
||||
Nothing to merge from
|
||||
%span.label-branch #{@merge_request.source_branch}
|
||||
to
|
||||
%span.label-branch #{@merge_request.target_branch}
|
||||
%br
|
||||
Try to use different branches or push new code.
|
||||
@@ -0,0 +1 @@
|
||||
This merge request cannot be merged. Try to reload the page.
|
||||
@@ -0,0 +1,13 @@
|
||||
- if @merge_request.can_be_merged_by?(current_user)
|
||||
%h4
|
||||
This merge request cannot be accepted because it is marked as Work In Progress.
|
||||
|
||||
%p
|
||||
%button.btn.disabled{:type => 'button'}
|
||||
%i.fa.fa-warning
|
||||
Accept Merge Request
|
||||
|
||||
When the merge request is ready, remove the "WIP" prefix from the title to allow it to be accepted.
|
||||
- else
|
||||
%strong This merge request is marked as Work In Progress.
|
||||
Only those with write access to this repository can merge merge requests.
|
||||
@@ -1,5 +1,8 @@
|
||||
# See https://github.com/jnicklas/carrierwave#using-amazon-s3
|
||||
# for more options
|
||||
# If you change this file in a Merge Request, please also create
|
||||
# a Merge Request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests
|
||||
#
|
||||
production:
|
||||
access_key_id: AKIA1111111111111UA
|
||||
secret_access_key: secret
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
#
|
||||
########################### NOTE #####################################
|
||||
# This file should not receive new settings. All configuration options #
|
||||
# are being moved to ApplicationSetting model! #
|
||||
# that do not require application restart are being moved to #
|
||||
# ApplicationSetting model! #
|
||||
# If you change this file in a Merge Request, please also create #
|
||||
# a MR on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests #
|
||||
########################################################################
|
||||
#
|
||||
#
|
||||
# How to use:
|
||||
# 1. Copy file as gitlab.yml
|
||||
# 2. Update gitlab -> host with your fully qualified domain name
|
||||
@@ -157,7 +161,7 @@ production: &base
|
||||
allow_username_or_email_login: false
|
||||
|
||||
# To maintain tight control over the number of active users on your GitLab installation,
|
||||
# enable this setting to keep new users blocked until they have been cleared by the admin
|
||||
# enable this setting to keep new users blocked until they have been cleared by the admin
|
||||
# (default: false).
|
||||
block_auto_created_users: false
|
||||
|
||||
@@ -290,6 +294,9 @@ production: &base
|
||||
# aws_secret_access_key: 'secret123'
|
||||
# # The remote 'directory' to store your backups. For S3, this would be the bucket name.
|
||||
# remote_directory: 'my.s3.bucket'
|
||||
# # Use multipart uploads when file size reaches 100MB, see
|
||||
# # http://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html
|
||||
# multipart_chunk_size: 104857600
|
||||
|
||||
## GitLab Shell settings
|
||||
gitlab_shell:
|
||||
|
||||
@@ -207,6 +207,7 @@ Settings.backup['upload'] ||= Settingslogic.new({ 'remote_directory' => nil, 'co
|
||||
if Settings.backup['upload']['connection']
|
||||
Settings.backup['upload']['connection'] = Hash[Settings.backup['upload']['connection'].map { |k, v| [k.to_sym, v] }]
|
||||
end
|
||||
Settings.backup['upload']['multipart_chunk_size'] ||= 104857600
|
||||
|
||||
#
|
||||
# Git
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# 1. Rename this file to rack_attack.rb
|
||||
# 2. Review the paths_to_be_protected and add any other path you need protecting
|
||||
#
|
||||
# If you change this file in a Merge Request, please also create a Merge Request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests
|
||||
|
||||
paths_to_be_protected = [
|
||||
"#{Rails.application.config.relative_url_root}/users/password",
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#
|
||||
# For full list of options and their values see http://api.rubyonrails.org/classes/ActionMailer/Base.html
|
||||
#
|
||||
# If you change this file in a Merge Request, please also create a Merge Request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests
|
||||
|
||||
if Rails.env.production?
|
||||
Gitlab::Application.config.action_mailer.delivery_method = :smtp
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# If you change this file in a Merge Request, please also create
|
||||
# a Merge Request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests
|
||||
#
|
||||
development: redis://localhost:6379
|
||||
test: redis://localhost:6379
|
||||
production: unix:/var/run/redis/redis.sock
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete
|
||||
# documentation.
|
||||
|
||||
# Note: If you change this file in a Merge Request, please also create a
|
||||
# Merge Request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests
|
||||
#
|
||||
# WARNING: See config/application.rb under "Relative url support" for the list of
|
||||
# other files that need to be changed for relative url support
|
||||
#
|
||||
|
||||
@@ -40,11 +40,11 @@ ActiveRecord::Schema.define(version: 20150609125332) do
|
||||
t.boolean "twitter_sharing_enabled", default: true
|
||||
t.text "help_text"
|
||||
t.text "restricted_visibility_levels"
|
||||
t.boolean "version_check_enabled", default: true
|
||||
t.integer "max_attachment_size", default: 10, null: false
|
||||
t.integer "default_project_visibility"
|
||||
t.integer "default_snippet_visibility"
|
||||
t.text "restricted_signup_domains"
|
||||
t.boolean "version_check_enabled", default: true
|
||||
t.boolean "user_oauth_applications", default: true
|
||||
t.string "after_sign_out_path"
|
||||
end
|
||||
@@ -579,12 +579,12 @@ ActiveRecord::Schema.define(version: 20150609125332) do
|
||||
t.string "bitbucket_access_token"
|
||||
t.string "bitbucket_access_token_secret"
|
||||
t.string "location"
|
||||
t.string "public_email", default: "", null: false
|
||||
t.string "encrypted_otp_secret"
|
||||
t.string "encrypted_otp_secret_iv"
|
||||
t.string "encrypted_otp_secret_salt"
|
||||
t.boolean "otp_required_for_login"
|
||||
t.text "otp_backup_codes"
|
||||
t.string "public_email", default: "", null: false
|
||||
end
|
||||
|
||||
add_index "users", ["admin"], name: "index_users_on_admin", using: :btree
|
||||
|
||||
@@ -215,4 +215,4 @@ Parameters:
|
||||
|
||||
- `id` (required) - The ID of a group
|
||||
- `cn` (required) - The CN of a LDAP group
|
||||
- `provider` (required) - Name of a LDAP provider
|
||||
- `provider` (required) - Name of a LDAP provider
|
||||
|
||||
@@ -39,7 +39,7 @@ Xth: (6 working days before the 22nd)
|
||||
|
||||
- [ ] Merge CE master in to EE master via merge request (#LINK)
|
||||
- [ ] Determine QA person and notify this person
|
||||
- [ ] Check the tasks in [how to rc1 guide](howto_rc1.md) and delegate tasks if necessary
|
||||
- [ ] Check the tasks in [how to rc1 guide](https://dev.gitlab.org/gitlab/gitlabhq/blob/master/doc/release/howto_rc1.md) and delegate tasks if necessary
|
||||
- [ ] Create CE, EE, CI RC1 versions (#LINK)
|
||||
|
||||
Xth: (5 working days before the 22nd)
|
||||
@@ -71,9 +71,14 @@ Xth: (1 working day before the 22nd)
|
||||
- [ ] Update GitLab.com with the stable version (#LINK)
|
||||
- [ ] Update ci.gitLab.com with the stable version (#LINK)
|
||||
|
||||
22nd:
|
||||
22nd before 12AM CET:
|
||||
|
||||
Release before 12AM CET / 3AM PST, to make sure the majority of our users
|
||||
get the new version on the 22nd and there is sufficient time in the European
|
||||
workday to quickly fix any issues.
|
||||
|
||||
- [ ] Release CE, EE and CI (#LINK)
|
||||
- [ ] Schedule a second tweet of the release announcement at 6PM CET / 9AM PST
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 61 KiB |
@@ -1,6 +1,6 @@
|
||||
# Migrating projects to a GitLab instance
|
||||
|
||||
1. [Bitbucket](doc/workflow/import_projects_from_bitbucket.md)
|
||||
2. [GitHub](doc/workflow/import_projects_from_github.md)
|
||||
3. [GitLab.com](doc/workflow/import_projects_from_gitlab_com.md)
|
||||
4. [SVN](doc/workflow/migrating_from_svn.md)
|
||||
# Migrating projects to a GitLab instance
|
||||
|
||||
1. [Bitbucket](import_projects_from_bitbucket.md)
|
||||
2. [GitHub](import_projects_from_github.md)
|
||||
3. [GitLab.com](import_projects_from_gitlab_com.md)
|
||||
4. [SVN](migrating_from_svn.md)
|
||||
|
||||
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
@@ -6,15 +6,15 @@ It takes just a few steps to import your existing Bitbucket projects to GitLab.
|
||||
|
||||
* Click on "New project"
|
||||
|
||||

|
||||

|
||||
|
||||
* Click on the "Bitbucket" button
|
||||
|
||||

|
||||

|
||||
|
||||
* Grant GitLab access to your Bitbucket account
|
||||
|
||||

|
||||

|
||||
|
||||
* Click on the projects that you'd like to import or "Import all projects"
|
||||
|
||||
@@ -23,4 +23,4 @@ It takes just a few steps to import your existing Bitbucket projects to GitLab.
|
||||
A new GitLab project will be created with your imported data.
|
||||
|
||||
### Note
|
||||
Milestones and wiki pages are not imported from Bitbucket.
|
||||
Milestones and wiki pages are not imported from Bitbucket.
|
||||
@@ -45,7 +45,7 @@ storage in a safe place. **Each code can be used only once** to log in to your
|
||||
account.
|
||||
|
||||
If you lose the recovery codes or just want to generate new ones, you can do so
|
||||
from the **Profile Settings** > **Acount** page where you first enabled 2FA.
|
||||
from the **Profile Settings** > **Account** page where you first enabled 2FA.
|
||||
|
||||
## Logging in with 2FA Enabled
|
||||
|
||||
@@ -60,8 +60,8 @@ your phone's application or a recovery code to log in.
|
||||
|
||||
1. Log in to your GitLab account.
|
||||
1. Go to your **Profile Settings**.
|
||||
1. Go to **Acount**.
|
||||
1. Go to **Account**.
|
||||
1. Click **Disable Two-factor Authentication**.
|
||||
|
||||
[Google Authenticator]: https://support.google.com/accounts/answer/1066447?hl=en
|
||||
[FreeOTP]: https://fedorahosted.org/freeotp/
|
||||
[FreeOTP]: https://fedorahosted.org/freeotp/
|
||||
|
||||
@@ -80,7 +80,7 @@ sudo docker pull sytse/gitlab-app:7.10.1
|
||||
|
||||
```bash
|
||||
sudo docker run --name gitlab-data sytse/gitlab-data /bin/true
|
||||
sudo docker run --detach --name gitlab_app --publish 8080:80 --publish 2222:22 --volumes-from gitlab_data sytse/gitlab-app:7.10.1
|
||||
sudo docker run --detach --name gitlab-app --publish 8080:80 --publish 2222:22 --volumes-from gitlab-data sytse/gitlab-app:7.10.1
|
||||
```
|
||||
|
||||
After this you can login to the web interface as explained above in 'After starting a container'.
|
||||
@@ -94,7 +94,12 @@ sudo docker build --tag gitlab-data docker/data/
|
||||
sudo docker build --tag gitlab-app:7.10.1 docker/app/
|
||||
```
|
||||
|
||||
After this run the images as described in the previous section.
|
||||
After this run the images:
|
||||
|
||||
```bash
|
||||
sudo docker run --name gitlab-data gitlab-data /bin/true
|
||||
sudo docker run --detach --name gitlab-app --publish 8080:80 --publish 2222:22 --volumes-from gitlab-data gitlab-app:7.10.1
|
||||
```
|
||||
|
||||
We assume using a data volume container, this will simplify migrations and backups.
|
||||
This empty container will exist to persist as volumes the 3 directories used by GitLab, so remember not to delete it.
|
||||
@@ -130,7 +135,7 @@ It Assumes that you're upgrading from 7.8.1 to 7.10.1 and you're in the updated
|
||||
sudo docker stop gitlab-app
|
||||
sudo docker rm gitlab-app
|
||||
sudo docker build --tag gitlab-app:7.10.1 docker/app/
|
||||
sudo docker run --detach --name gitlab-app --publish 8080:80 --publish 2222:22 --volumes-from gitlab_data gitlab-app:7.10.1
|
||||
sudo docker run --detach --name gitlab-app --publish 8080:80 --publish 2222:22 --volumes-from gitlab-data gitlab-app:7.10.1
|
||||
```
|
||||
|
||||
On the first run GitLab will reconfigure and update itself. If everything runs OK don't forget to cleanup the app image:
|
||||
@@ -143,13 +148,13 @@ sudo docker rmi gitlab-app:7.8.1
|
||||
|
||||
- Ensure the containers are running
|
||||
- Login to Dockerhub with `sudo docker login`
|
||||
- Run the following (replace '7.9.2' with the version you're using and 'Sytse Sijbrandij' with your name):
|
||||
- Run the following (replace '7.10.1' with the version you're using and 'Sytse Sijbrandij' with your name):
|
||||
|
||||
```bash
|
||||
sudo docker commit -m "Initial commit" -a "Sytse Sijbrandij" gitlab-app sytse/gitlab-app:7.10.1
|
||||
sudo docker push sytse/gitlab-app:7.10.1
|
||||
sudo docker commit -m "Initial commit" -a "Sytse Sijbrandij" gitlab_data sytse/gitlab_data
|
||||
sudo docker push sytse/gitlab_data
|
||||
sudo docker commit -m "Initial commit" -a "Sytse Sijbrandij" gitlab-data sytse/gitlab-data
|
||||
sudo docker push sytse/gitlab-data
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
@@ -35,6 +35,11 @@ Feature: Project Active Tab
|
||||
Then the active main tab should be Merge Requests
|
||||
And no other main tabs should be active
|
||||
|
||||
Scenario: On Project Members
|
||||
Given I visit my project's members page
|
||||
Then the active main tab should be Members
|
||||
And no other main tabs should be active
|
||||
|
||||
Scenario: On Project Wiki
|
||||
Given I visit my project's wiki page
|
||||
Then the active main tab should be Wiki
|
||||
@@ -49,13 +54,6 @@ Feature: Project Active Tab
|
||||
|
||||
# Sub Tabs: Settings
|
||||
|
||||
Scenario: On Project Settings/Team
|
||||
Given I visit my project's settings page
|
||||
And I click the "Team" tab
|
||||
Then the active sub nav should be Team
|
||||
And no other sub navs should be active
|
||||
And the active main tab should be Settings
|
||||
|
||||
Scenario: On Project Settings/Edit
|
||||
Given I visit my project's settings page
|
||||
And I click the "Edit" tab
|
||||
|
||||
@@ -67,9 +67,10 @@ Feature: Project
|
||||
Scenario: I should see audit events
|
||||
And gitlab user "Pete"
|
||||
And "Pete" is "Shop" developer
|
||||
When I visit project "Shop" settings page
|
||||
When I visit project "Shop" page
|
||||
And I go to "Members"
|
||||
And I change "Pete" access level to master
|
||||
And I visit project "Shop" settings page
|
||||
And I go to "Audit Events"
|
||||
Then I should see the audit event listed
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ class Spinach::Features::AdminApplications < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see application form' do
|
||||
page.should have_content "New application"
|
||||
expect(page).to have_content "New application"
|
||||
end
|
||||
|
||||
step 'I fill application form out and submit' do
|
||||
@@ -18,9 +18,9 @@ class Spinach::Features::AdminApplications < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I see application' do
|
||||
page.should have_content "Application: test"
|
||||
page.should have_content "Application Id"
|
||||
page.should have_content "Secret"
|
||||
expect(page).to have_content "Application: test"
|
||||
expect(page).to have_content "Application Id"
|
||||
expect(page).to have_content "Secret"
|
||||
end
|
||||
|
||||
step 'I click edit' do
|
||||
@@ -28,28 +28,28 @@ class Spinach::Features::AdminApplications < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I see edit application form' do
|
||||
page.should have_content "Edit application"
|
||||
expect(page).to have_content "Edit application"
|
||||
end
|
||||
|
||||
step 'I change name of application and submit' do
|
||||
page.should have_content "Edit application"
|
||||
expect(page).to have_content "Edit application"
|
||||
fill_in :doorkeeper_application_name, with: 'test_changed'
|
||||
click_on "Submit"
|
||||
end
|
||||
|
||||
step 'I see that application was changed' do
|
||||
page.should have_content "test_changed"
|
||||
page.should have_content "Application Id"
|
||||
page.should have_content "Secret"
|
||||
expect(page).to have_content "test_changed"
|
||||
expect(page).to have_content "Application Id"
|
||||
expect(page).to have_content "Secret"
|
||||
end
|
||||
|
||||
step 'I click to remove application' do
|
||||
within '.oauth-applications' do
|
||||
page.within '.oauth-applications' do
|
||||
click_on "Destroy"
|
||||
end
|
||||
end
|
||||
|
||||
step "I see that application is removed" do
|
||||
page.find(".oauth-applications").should_not have_content "test_changed"
|
||||
expect(page.find(".oauth-applications")).not_to have_content "test_changed"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,7 +8,7 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should be all broadcast messages' do
|
||||
page.should have_content "Migration to new server"
|
||||
expect(page).to have_content "Migration to new server"
|
||||
end
|
||||
|
||||
step 'submit form with new broadcast message' do
|
||||
@@ -18,11 +18,11 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should be redirected to admin messages page' do
|
||||
current_path.should == admin_broadcast_messages_path
|
||||
expect(current_path).to eq admin_broadcast_messages_path
|
||||
end
|
||||
|
||||
step 'I should see newly created broadcast message' do
|
||||
page.should have_content 'Application update from 4:00 CST to 5:00 CST'
|
||||
expect(page).to have_content 'Application update from 4:00 CST to 5:00 CST'
|
||||
end
|
||||
|
||||
step 'submit form with new customized broadcast message' do
|
||||
@@ -35,7 +35,7 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see a customized broadcast message' do
|
||||
page.should have_content 'Application update from 4:00 CST to 5:00 CST'
|
||||
page.should have_selector %(div[style="background-color:#f2dede;color:#b94a48"])
|
||||
expect(page).to have_content 'Application update from 4:00 CST to 5:00 CST'
|
||||
expect(page).to have_selector %(div[style="background-color:#f2dede;color:#b94a48"])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,7 +10,7 @@ class Spinach::Features::AdminDeployKeys < Spinach::FeatureSteps
|
||||
|
||||
step 'I should see all public deploy keys' do
|
||||
DeployKey.are_public.each do |p|
|
||||
page.should have_content p.title
|
||||
expect(page).to have_content p.title
|
||||
end
|
||||
end
|
||||
|
||||
@@ -33,11 +33,11 @@ class Spinach::Features::AdminDeployKeys < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should be on admin deploy keys page' do
|
||||
current_path.should == admin_deploy_keys_path
|
||||
expect(current_path).to eq admin_deploy_keys_path
|
||||
end
|
||||
|
||||
step 'I should see newly created deploy key' do
|
||||
page.should have_content(deploy_key.title)
|
||||
expect(page).to have_content(deploy_key.title)
|
||||
end
|
||||
|
||||
def deploy_key
|
||||
|
||||
@@ -28,32 +28,32 @@ class Spinach::Features::AdminGroups < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see newly created group' do
|
||||
page.should have_content "Group: gitlab"
|
||||
page.should have_content "Group description"
|
||||
expect(page).to have_content "Group: gitlab"
|
||||
expect(page).to have_content "Group description"
|
||||
end
|
||||
|
||||
step 'I should be redirected to group page' do
|
||||
current_path.should == admin_group_path(Group.find_by(path: 'gitlab'))
|
||||
expect(current_path).to eq admin_group_path(Group.find_by(path: 'gitlab'))
|
||||
end
|
||||
|
||||
When 'I select user "John Doe" from user list as "Reporter"' do
|
||||
select2(user_john.id, from: "#user_ids", multiple: true)
|
||||
within "#new_project_member" do
|
||||
page.within "#new_project_member" do
|
||||
select "Reporter", from: "access_level"
|
||||
end
|
||||
click_button "Add users to group"
|
||||
end
|
||||
|
||||
step 'I should see "John Doe" in team list in every project as "Reporter"' do
|
||||
within ".group-users-list" do
|
||||
page.should have_content "John Doe"
|
||||
page.should have_content "Reporter"
|
||||
page.within ".group-users-list" do
|
||||
expect(page).to have_content "John Doe"
|
||||
expect(page).to have_content "Reporter"
|
||||
end
|
||||
end
|
||||
|
||||
step 'I should be all groups' do
|
||||
Group.all.each do |group|
|
||||
page.should have_content group.name
|
||||
expect(page).to have_content group.name
|
||||
end
|
||||
end
|
||||
|
||||
@@ -77,14 +77,14 @@ class Spinach::Features::AdminGroups < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I remove user "John Doe" from group' do
|
||||
within "#user_#{user_john.id}" do
|
||||
page.within "#user_#{user_john.id}" do
|
||||
click_link 'Remove user from group'
|
||||
end
|
||||
end
|
||||
|
||||
step 'I should not see "John Doe" in team list' do
|
||||
within ".group-users-list" do
|
||||
page.should_not have_content "John Doe"
|
||||
page.within ".group-users-list" do
|
||||
expect(page).not_to have_content "John Doe"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ class Spinach::Features::AdminLogs < Spinach::FeatureSteps
|
||||
include SharedAdmin
|
||||
|
||||
step 'I should see tabs with available logs' do
|
||||
page.should have_content 'production.log'
|
||||
page.should have_content 'githost.log'
|
||||
page.should have_content 'application.log'
|
||||
expect(page).to have_content 'production.log'
|
||||
expect(page).to have_content 'githost.log'
|
||||
expect(page).to have_content 'application.log'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
|
||||
|
||||
step 'I should see all projects' do
|
||||
Project.all.each do |p|
|
||||
page.should have_content p.name_with_namespace
|
||||
expect(page).to have_content p.name_with_namespace
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,9 +15,9 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
|
||||
|
||||
step 'I should see project details' do
|
||||
project = Project.first
|
||||
current_path.should == admin_namespace_project_path(project.namespace, project)
|
||||
page.should have_content(project.name_with_namespace)
|
||||
page.should have_content(project.creator.name)
|
||||
expect(current_path).to eq admin_namespace_project_path(project.namespace, project)
|
||||
expect(page).to have_content(project.name_with_namespace)
|
||||
expect(page).to have_content(project.creator.name)
|
||||
end
|
||||
|
||||
step 'I visit admin project page' do
|
||||
@@ -34,8 +34,8 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see project transfered' do
|
||||
page.should have_content 'Web / ' + project.name
|
||||
page.should have_content 'Namespace: Web'
|
||||
expect(page).to have_content 'Web / ' + project.name
|
||||
expect(page).to have_content 'Namespace: Web'
|
||||
end
|
||||
|
||||
def project
|
||||
|
||||
@@ -11,9 +11,9 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see application settings saved' do
|
||||
current_application_settings.gravatar_enabled.should be_false
|
||||
current_application_settings.home_page_url.should == 'https://about.gitlab.com/'
|
||||
page.should have_content 'Application settings saved successfully'
|
||||
expect(current_application_settings.gravatar_enabled).to be_false
|
||||
expect(current_application_settings.home_page_url).to eq 'https://about.gitlab.com/'
|
||||
expect(page).to have_content 'Application settings saved successfully'
|
||||
end
|
||||
|
||||
step 'I set the help text' do
|
||||
@@ -54,19 +54,19 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see service template settings saved' do
|
||||
page.should have_content 'Application settings saved successfully'
|
||||
expect(page).to have_content 'Application settings saved successfully'
|
||||
end
|
||||
|
||||
step 'I should see all checkboxes checked' do
|
||||
all('input[type=checkbox]').each do |checkbox|
|
||||
checkbox.should be_checked
|
||||
page.all('input[type=checkbox]').each do |checkbox|
|
||||
expect(checkbox).to be_checked
|
||||
end
|
||||
end
|
||||
|
||||
step 'I should see Slack settings saved' do
|
||||
find_field('Webhook').value.should eq 'http://localhost'
|
||||
find_field('Username').value.should eq 'test_user'
|
||||
find_field('Channel').value.should eq '#test_channel'
|
||||
expect(find_field('Webhook').value).to eq 'http://localhost'
|
||||
expect(find_field('Username').value).to eq 'test_user'
|
||||
expect(find_field('Channel').value).to eq '#test_channel'
|
||||
end
|
||||
|
||||
def help_text
|
||||
|
||||
@@ -5,7 +5,7 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
|
||||
|
||||
step 'I should see all users' do
|
||||
User.all.each do |user|
|
||||
page.should have_content user.name
|
||||
expect(page).to have_content user.name
|
||||
end
|
||||
end
|
||||
|
||||
@@ -23,13 +23,13 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'See username error message' do
|
||||
within "#error_explanation" do
|
||||
page.should have_content "Username"
|
||||
page.within "#error_explanation" do
|
||||
expect(page).to have_content "Username"
|
||||
end
|
||||
end
|
||||
|
||||
step 'Not changed form action url' do
|
||||
page.should have_selector %(form[action="/admin/users/#{@user.username}"])
|
||||
expect(page).to have_selector %(form[action="/admin/users/#{@user.username}"])
|
||||
end
|
||||
|
||||
step 'I submit modified user' do
|
||||
@@ -38,7 +38,7 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I see user attributes changed' do
|
||||
page.should have_content 'Can create groups: Yes'
|
||||
expect(page).to have_content 'Can create groups: Yes'
|
||||
end
|
||||
|
||||
step 'click edit on my user' do
|
||||
@@ -53,7 +53,7 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I see the secondary email' do
|
||||
page.should have_content "Secondary email: #{@user_with_secondary_email.emails.last.email}"
|
||||
expect(page).to have_content "Secondary email: #{@user_with_secondary_email.emails.last.email}"
|
||||
end
|
||||
|
||||
step 'I click remove secondary email' do
|
||||
@@ -61,7 +61,7 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should not see secondary email anymore' do
|
||||
page.should_not have_content "Secondary email:"
|
||||
expect(page).not_to have_content "Secondary email:"
|
||||
end
|
||||
|
||||
step 'user "Mike" with groups and projects' do
|
||||
@@ -79,8 +79,8 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see user "Mike" details' do
|
||||
page.should have_content 'Account'
|
||||
page.should have_content 'Personal projects limit'
|
||||
expect(page).to have_content 'Account'
|
||||
expect(page).to have_content 'Personal projects limit'
|
||||
end
|
||||
|
||||
step 'user "Pete" with ssh keys' do
|
||||
@@ -94,8 +94,8 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see key list' do
|
||||
page.should have_content 'ssh-rsa Key2'
|
||||
page.should have_content 'ssh-rsa Key1'
|
||||
expect(page).to have_content 'ssh-rsa Key2'
|
||||
expect(page).to have_content 'ssh-rsa Key1'
|
||||
end
|
||||
|
||||
step 'I click on the key title' do
|
||||
@@ -103,8 +103,8 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see key details' do
|
||||
page.should have_content 'ssh-rsa Key2'
|
||||
page.should have_content 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQSTWXhJAX/He+nG78MiRRRn7m0Pb0XbcgTxE0etArgoFoh9WtvDf36HG6tOSg/0UUNcp0dICsNAmhBKdncp6cIyPaXJTURPRAGvhI0/VDk4bi27bRnccGbJ/hDaUxZMLhhrzY0r22mjVf8PF6dvv5QUIQVm1/LeaWYsHHvLgiIjwrXirUZPnFrZw6VLREoBKG8uWvfSXw1L5eapmstqfsME8099oi+vWLR8MgEysZQmD28M73fgW4zek6LDQzKQyJx9nB+hJkKUDvcuziZjGmRFlNgSA2mguERwL1OXonD8WYUrBDGKroIvBT39zS5d9tQDnidEJZ9Y8gv5ViYP7x Key2'
|
||||
expect(page).to have_content 'ssh-rsa Key2'
|
||||
expect(page).to have_content 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQSTWXhJAX/He+nG78MiRRRn7m0Pb0XbcgTxE0etArgoFoh9WtvDf36HG6tOSg/0UUNcp0dICsNAmhBKdncp6cIyPaXJTURPRAGvhI0/VDk4bi27bRnccGbJ/hDaUxZMLhhrzY0r22mjVf8PF6dvv5QUIQVm1/LeaWYsHHvLgiIjwrXirUZPnFrZw6VLREoBKG8uWvfSXw1L5eapmstqfsME8099oi+vWLR8MgEysZQmD28M73fgW4zek6LDQzKQyJx9nB+hJkKUDvcuziZjGmRFlNgSA2mguERwL1OXonD8WYUrBDGKroIvBT39zS5d9tQDnidEJZ9Y8gv5ViYP7x Key2'
|
||||
end
|
||||
|
||||
step 'I click on remove key' do
|
||||
@@ -112,6 +112,6 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see the key removed' do
|
||||
page.should_not have_content 'ssh-rsa Key2'
|
||||
expect(page).not_to have_content 'ssh-rsa Key2'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,14 +9,14 @@ class Spinach::Features::DashboardArchivedProjects < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see "Shop" project link' do
|
||||
page.should have_link "Shop"
|
||||
expect(page).to have_link "Shop"
|
||||
end
|
||||
|
||||
step 'I should not see "Forum" project link' do
|
||||
page.should_not have_link "Forum"
|
||||
expect(page).not_to have_link "Forum"
|
||||
end
|
||||
|
||||
step 'I should see "Forum" project link' do
|
||||
page.should have_link "Forum"
|
||||
expect(page).to have_link "Forum"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,16 +4,16 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
|
||||
include SharedProject
|
||||
|
||||
step 'I should see "New Project" link' do
|
||||
page.should have_link "New project"
|
||||
expect(page).to have_link "New project"
|
||||
end
|
||||
|
||||
step 'I should see "Shop" project link' do
|
||||
page.should have_link "Shop"
|
||||
expect(page).to have_link "Shop"
|
||||
end
|
||||
|
||||
step 'I should see last push widget' do
|
||||
page.should have_content "You pushed to fix"
|
||||
page.should have_link "Create Merge Request"
|
||||
expect(page).to have_content "You pushed to fix"
|
||||
expect(page).to have_link "Create Merge Request"
|
||||
end
|
||||
|
||||
step 'I click "Create Merge Request" link' do
|
||||
@@ -21,10 +21,10 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I see prefilled new Merge Request page' do
|
||||
current_path.should == new_namespace_project_merge_request_path(@project.namespace, @project)
|
||||
find("#merge_request_target_project_id").value.should == @project.id.to_s
|
||||
find("input#merge_request_source_branch").value.should == "fix"
|
||||
find("input#merge_request_target_branch").value.should == "master"
|
||||
expect(current_path).to eq new_namespace_project_merge_request_path(@project.namespace, @project)
|
||||
expect(find("#merge_request_target_project_id").value).to eq @project.id.to_s
|
||||
expect(find("input#merge_request_source_branch").value).to eq "fix"
|
||||
expect(find("input#merge_request_target_branch").value).to eq "master"
|
||||
end
|
||||
|
||||
step 'user with name "John Doe" joined project "Shop"' do
|
||||
@@ -38,7 +38,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see "John Doe joined project Shop" event' do
|
||||
page.should have_content "John Doe joined project #{project.name_with_namespace}"
|
||||
expect(page).to have_content "John Doe joined project #{project.name_with_namespace}"
|
||||
end
|
||||
|
||||
step 'user with name "John Doe" left project "Shop"' do
|
||||
@@ -51,7 +51,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see "John Doe left project Shop" event' do
|
||||
page.should have_content "John Doe left project #{project.name_with_namespace}"
|
||||
expect(page).to have_content "John Doe left project #{project.name_with_namespace}"
|
||||
end
|
||||
|
||||
step 'I have group with projects' do
|
||||
@@ -64,13 +64,13 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
|
||||
|
||||
step 'I should see projects list' do
|
||||
@user.authorized_projects.all.each do |project|
|
||||
page.should have_link project.name_with_namespace
|
||||
expect(page).to have_link project.name_with_namespace
|
||||
end
|
||||
end
|
||||
|
||||
step 'I should see groups list' do
|
||||
Group.all.each do |group|
|
||||
page.should have_link group.name
|
||||
expect(page).to have_link group.name
|
||||
end
|
||||
end
|
||||
|
||||
@@ -80,6 +80,6 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see 1 project at group list' do
|
||||
find('span.last_activity/span').should have_content('1')
|
||||
expect(find('span.last_activity/span')).to have_content('1')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,27 +4,27 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps
|
||||
include SharedProject
|
||||
|
||||
step 'I should see push event' do
|
||||
page.should have_selector('span.pushed')
|
||||
expect(page).to have_selector('span.pushed')
|
||||
end
|
||||
|
||||
step 'I should not see push event' do
|
||||
page.should_not have_selector('span.pushed')
|
||||
expect(page).not_to have_selector('span.pushed')
|
||||
end
|
||||
|
||||
step 'I should see new member event' do
|
||||
page.should have_selector('span.joined')
|
||||
expect(page).to have_selector('span.joined')
|
||||
end
|
||||
|
||||
step 'I should not see new member event' do
|
||||
page.should_not have_selector('span.joined')
|
||||
expect(page).not_to have_selector('span.joined')
|
||||
end
|
||||
|
||||
step 'I should see merge request event' do
|
||||
page.should have_selector('span.accepted')
|
||||
expect(page).to have_selector('span.accepted')
|
||||
end
|
||||
|
||||
step 'I should not see merge request event' do
|
||||
page.should_not have_selector('span.accepted')
|
||||
expect(page).not_to have_selector('span.accepted')
|
||||
end
|
||||
|
||||
step 'this project has push event' do
|
||||
|
||||
@@ -17,29 +17,29 @@ class Spinach::Features::DashboardGroup < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should not see the "Leave" button for group "Owned"' do
|
||||
find(:css, 'li', text: "Owner").should_not have_selector(:css, 'i.fa.fa-sign-out')
|
||||
expect(find(:css, 'li', text: "Owner")).not_to have_selector(:css, 'i.fa.fa-sign-out')
|
||||
# poltergeist always confirms popups.
|
||||
end
|
||||
|
||||
step 'I should not see the "Leave" button for groupr "Guest"' do
|
||||
find(:css, 'li', text: "Guest").should_not have_selector(:css, 'i.fa.fa-sign-out')
|
||||
expect(find(:css, 'li', text: "Guest")).not_to have_selector(:css, 'i.fa.fa-sign-out')
|
||||
# poltergeist always confirms popups.
|
||||
end
|
||||
|
||||
step 'I should see group "Owned" in group list' do
|
||||
page.should have_content("Owned")
|
||||
expect(page).to have_content("Owned")
|
||||
end
|
||||
|
||||
step 'I should not see group "Owned" in group list' do
|
||||
page.should_not have_content("Owned")
|
||||
expect(page).not_to have_content("Owned")
|
||||
end
|
||||
|
||||
step 'I should see group "Guest" in group list' do
|
||||
page.should have_content("Guest")
|
||||
expect(page).to have_content("Guest")
|
||||
end
|
||||
|
||||
step 'I should not see group "Guest" in group list' do
|
||||
page.should_not have_content("Guest")
|
||||
expect(page).not_to have_content("Guest")
|
||||
end
|
||||
|
||||
step 'I click new group link' do
|
||||
@@ -53,15 +53,15 @@ class Spinach::Features::DashboardGroup < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should be redirected to group "Samurai" page' do
|
||||
current_path.should == group_path(Group.find_by(name: 'Samurai'))
|
||||
expect(current_path).to eq group_path(Group.find_by(name: 'Samurai'))
|
||||
end
|
||||
|
||||
step 'I should see newly created group "Samurai"' do
|
||||
page.should have_content "Samurai"
|
||||
page.should have_content "Tokugawa Shogunate"
|
||||
expect(page).to have_content "Samurai"
|
||||
expect(page).to have_content "Tokugawa Shogunate"
|
||||
end
|
||||
|
||||
step 'I should see the "Can not leave message"' do
|
||||
page.should have_content "You can not leave Owned group because you're the last owner"
|
||||
expect(page).to have_content "You can not leave Owned group because you're the last owner"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -12,7 +12,7 @@ class Spinach::Features::DashboardHelp < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see "Rake Tasks" page markdown rendered' do
|
||||
page.should have_content "Gather information about GitLab and the system it runs on"
|
||||
expect(page).to have_content "Gather information about GitLab and the system it runs on"
|
||||
end
|
||||
|
||||
step 'Header "Rebuild project satellites" should have correct ids and links' do
|
||||
|
||||
@@ -46,11 +46,11 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
def should_see(issue)
|
||||
page.should have_content(issue.title[0..10])
|
||||
expect(page).to have_content(issue.title[0..10])
|
||||
end
|
||||
|
||||
def should_not_see(issue)
|
||||
page.should_not have_content(issue.title[0..10])
|
||||
expect(page).not_to have_content(issue.title[0..10])
|
||||
end
|
||||
|
||||
def assigned_issue
|
||||
|
||||