Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e7969d6f
Commit
e7969d6f
authored
Dec 07, 2015
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Satisfy Douwe Maan
parent
4c8666e6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
CHANGELOG
CHANGELOG
+1
-1
app/services/system_note_service.rb
app/services/system_note_service.rb
+1
-1
spec/features/merge_requests/merge_when_build_succeeds_spec.rb
...features/merge_requests/merge_when_build_succeeds_spec.rb
+6
-8
No files found.
CHANGELOG
View file @
e7969d6f
Please view this file on the master branch, on stable branches it's out of date.
v 8.3.0 (unreleased)
- Merge when build succeeds (Zeger-Jan van de Weg)
- Merge when build succeeds (Zeger-Jan van de Weg)
- Fix: Assignee selector is empty when 'Unassigned' is selected (Jose Corcuera)
- Fix 500 error when update group member permission
- Trim leading and trailing whitespace of milestone and issueable titles (Jose Corcuera)
...
...
app/services/system_note_service.rb
View file @
e7969d6f
...
...
@@ -132,7 +132,7 @@ class SystemNoteService
# Called when 'merge when build succeeds' is executed
def
self
.
merge_when_build_succeeds
(
noteable
,
project
,
author
,
last_commit
)
body
=
"Enabled an automatic merge when the build for
#{
last_commit
.
to_reference
}
succeeds"
body
=
"Enabled an automatic merge when the build for
#{
last_commit
.
to_reference
(
project
)
}
succeeds"
create_note
(
noteable:
noteable
,
project:
project
,
author:
author
,
note:
body
)
end
...
...
spec/features/merge_requests/merge_when_build_succeeds_spec.rb
View file @
e7969d6f
require
'spec_helper'
# rubocop:disable Lint/UselessAssignment
# As rubocop doesn't see a need for both `ci_commit` and `ci_build`
feature
'Merge When Build Succeeds'
,
feature:
true
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
...
...
@@ -14,10 +12,10 @@ feature 'Merge When Build Succeeds', feature: true, js: true do
end
context
"Active build for Merge Request"
do
before
do
ci_commit
=
create
(
:ci_commit
,
gl_project:
project
,
sha:
merge_request
.
last_commit
.
id
,
ref:
merge_request
.
source_branch
)
ci_build
=
create
(
:ci_build
,
commit:
ci_commit
)
let!
(
:ci_commit
)
{
create
(
:ci_commit
,
gl_project:
project
,
sha:
merge_request
.
last_commit
.
id
,
ref:
merge_request
.
source_branch
)
}
let!
(
:ci_build
)
{
create
(
:ci_build
,
commit:
ci_commit
)
}
before
do
login_as
user
visit_merge_request
(
merge_request
)
end
...
...
@@ -49,14 +47,15 @@ feature 'Merge When Build Succeeds', feature: true, js: true do
merge_user:
user
,
title:
"MepMep"
,
merge_when_build_succeeds:
true
)
end
let!
(
:ci_commit
)
{
create
(
:ci_commit
,
gl_project:
project
,
sha:
merge_request
.
last_commit
.
id
,
ref:
merge_request
.
source_branch
)
}
let!
(
:ci_build
)
{
create
(
:ci_build
,
commit:
ci_commit
)
}
before
do
merge_request
.
source_project
.
team
<<
[
user
,
:master
]
merge_request
.
source_branch
=
"feature"
merge_request
.
target_branch
=
"master"
merge_request
.
save!
ci_commit
=
create
(
:ci_commit
,
gl_project:
project
,
sha:
merge_request
.
last_commit
.
id
,
ref:
merge_request
.
source_branch
)
ci_build
=
create
(
:ci_build
,
commit:
ci_commit
)
login_as
user
visit_merge_request
(
merge_request
)
...
...
@@ -90,4 +89,3 @@ feature 'Merge When Build Succeeds', feature: true, js: true do
visit
namespace_project_merge_request_path
(
merge_request
.
project
.
namespace
,
merge_request
.
project
,
merge_request
)
end
end
# rubocop:enable Lint/UselessAssignment
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