BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
591f10f6
Commit
591f10f6
authored
Nov 11, 2016
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 8.14-rc1 migrations to minimize downtime and deploy time
See
https://gitlab.com/gitlab-org/gitlab-ce/issues/24386
parent
67041e63
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
5 deletions
+14
-5
project.rb
app/models/project.rb
+4
-0
20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb
...31004_only_allow_merge_if_all_discussions_are_resolved.rb
+1
-4
20161011222551_remove_inactive_jira_service_properties.rb
...20161011222551_remove_inactive_jira_service_properties.rb
+0
-0
schema.rb
db/schema.rb
+1
-1
projects_spec.rb
spec/requests/api/projects_spec.rb
+8
-0
No files found.
app/models/project.rb
View file @
591f10f6
...
...
@@ -1334,6 +1334,10 @@ class Project < ActiveRecord::Base
end
end
def
only_allow_merge_if_all_discussions_are_resolved
super
||
false
end
private
def
pushes_since_gc_redis_key
...
...
db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb
View file @
591f10f6
...
...
@@ -5,10 +5,7 @@ class OnlyAllowMergeIfAllDiscussionsAreResolved < ActiveRecord::Migration
disable_ddl_transaction!
def
up
add_column_with_default
(
:projects
,
:only_allow_merge_if_all_discussions_are_resolved
,
:boolean
,
default:
false
)
add_column
:projects
,
:only_allow_merge_if_all_discussions_are_resolved
,
:boolean
end
def
down
...
...
db/migrate/20161011222551_remove_inactive_jira_service_properties.rb
→
db/
post_
migrate/20161011222551_remove_inactive_jira_service_properties.rb
View file @
591f10f6
File moved
db/schema.rb
View file @
591f10f6
...
...
@@ -912,7 +912,7 @@ ActiveRecord::Schema.define(version: 20161109150329) do
t
.
boolean
"has_external_wiki"
t
.
boolean
"lfs_enabled"
t
.
text
"description_html"
t
.
boolean
"only_allow_merge_if_all_discussions_are_resolved"
,
default:
false
,
null:
false
t
.
boolean
"only_allow_merge_if_all_discussions_are_resolved"
end
add_index
"projects"
,
[
"ci_id"
],
name:
"index_projects_on_ci_id"
,
using: :btree
...
...
spec/requests/api/projects_spec.rb
View file @
591f10f6
...
...
@@ -360,6 +360,14 @@ describe API::API, api: true do
expect
(
json_response
[
'only_allow_merge_if_all_discussions_are_resolved'
]).
to
be_falsey
end
it
'sets a project as allowing merge if only_allow_merge_if_all_discussions_are_resolved is nil'
do
project
=
attributes_for
(
:project
,
only_allow_merge_if_all_discussions_are_resolved:
nil
)
post
api
(
'/projects'
,
user
),
project
expect
(
json_response
[
'only_allow_merge_if_all_discussions_are_resolved'
]).
to
be_falsey
end
it
'sets a project as allowing merge only if all discussions are resolved'
do
project
=
attributes_for
(
:project
,
{
only_allow_merge_if_all_discussions_are_resolved:
true
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment