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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
6e6a9906
Commit
6e6a9906
authored
Nov 23, 2015
by
Ted Hogan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No space required after WIP identifier
Modified changelog
parent
36f7b624
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
CHANGELOG
CHANGELOG
+1
-0
app/models/merge_request.rb
app/models/merge_request.rb
+1
-1
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+15
-0
No files found.
CHANGELOG
View file @
6e6a9906
...
@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
...
@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.3.0 (unreleased)
v 8.3.0 (unreleased)
- Fix: Assignee selector is empty when 'Unassigned' is selected (Jose Corcuera)
- Fix: Assignee selector is empty when 'Unassigned' is selected (Jose Corcuera)
- WIP identifier on merge requests no longer requires trailing space
v 8.2.0
v 8.2.0
- Improved performance of finding projects and groups in various places
- Improved performance of finding projects and groups in various places
...
...
app/models/merge_request.rb
View file @
6e6a9906
...
@@ -239,7 +239,7 @@ class MergeRequest < ActiveRecord::Base
...
@@ -239,7 +239,7 @@ class MergeRequest < ActiveRecord::Base
end
end
def
work_in_progress?
def
work_in_progress?
!!
(
title
=~
/\A\[?WIP
\]?:?
/i
)
!!
(
title
=~
/\A\[?WIP
(\]|:| )
/i
)
end
end
def
mergeable?
def
mergeable?
...
...
spec/models/merge_request_spec.rb
View file @
6e6a9906
...
@@ -162,6 +162,21 @@ describe MergeRequest do
...
@@ -162,6 +162,21 @@ describe MergeRequest do
expect
(
subject
).
to
be_work_in_progress
expect
(
subject
).
to
be_work_in_progress
end
end
it
"detects the 'WIP' prefix"
do
subject
.
title
=
"WIP
#{
subject
.
title
}
"
expect
(
subject
).
to
be_work_in_progress
end
it
"detects the 'WIP:' prefix"
do
subject
.
title
=
"WIP:
#{
subject
.
title
}
"
expect
(
subject
).
to
be_work_in_progress
end
it
"detects the '[WIP]' prefix"
do
subject
.
title
=
"[WIP]
#{
subject
.
title
}
"
expect
(
subject
).
to
be_work_in_progress
end
it
"doesn't detect WIP for words starting with WIP"
do
it
"doesn't detect WIP for words starting with WIP"
do
subject
.
title
=
"Wipwap
#{
subject
.
title
}
"
subject
.
title
=
"Wipwap
#{
subject
.
title
}
"
expect
(
subject
).
not_to
be_work_in_progress
expect
(
subject
).
not_to
be_work_in_progress
...
...
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