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
fd21d72b
Commit
fd21d72b
authored
Feb 05, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend issue closing pattern.
parent
0a34f2dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
2 deletions
+93
-2
CHANGELOG
CHANGELOG
+1
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-1
spec/lib/gitlab/closing_issue_extractor_spec.rb
spec/lib/gitlab/closing_issue_extractor_spec.rb
+91
-1
No files found.
CHANGELOG
View file @
fd21d72b
...
@@ -39,6 +39,7 @@ v 7.8.0
...
@@ -39,6 +39,7 @@ v 7.8.0
-
-
- Submit comment on command-enter
- Submit comment on command-enter
- Notify all members of a group when that group is mentioned in a comment, for example: `@gitlab-org` or `@sales`.
- Notify all members of a group when that group is mentioned in a comment, for example: `@gitlab-org` or `@sales`.
- Extend issue clossing pattern to include "Resolve", "Resolves", "Resolved", "Resolving" and "Close"
-
-
- Fix long broadcast message cut-off on left sidebar (Visay Keo)
- Fix long broadcast message cut-off on left sidebar (Visay Keo)
- Add Project Avatars (Steven Thonus and Hannes Rosenögger)
- Add Project Avatars (Steven Thonus and Hannes Rosenögger)
...
...
config/initializers/1_settings.rb
View file @
fd21d72b
...
@@ -114,7 +114,7 @@ Settings.gitlab['signup_enabled'] ||= true if Settings.gitlab['signup_enabled'].
...
@@ -114,7 +114,7 @@ Settings.gitlab['signup_enabled'] ||= true if Settings.gitlab['signup_enabled'].
Settings
.
gitlab
[
'signin_enabled'
]
||=
true
if
Settings
.
gitlab
[
'signin_enabled'
].
nil?
Settings
.
gitlab
[
'signin_enabled'
]
||=
true
if
Settings
.
gitlab
[
'signin_enabled'
].
nil?
Settings
.
gitlab
[
'restricted_visibility_levels'
]
=
Settings
.
send
(
:verify_constant_array
,
Gitlab
::
VisibilityLevel
,
Settings
.
gitlab
[
'restricted_visibility_levels'
],
[])
Settings
.
gitlab
[
'restricted_visibility_levels'
]
=
Settings
.
send
(
:verify_constant_array
,
Gitlab
::
VisibilityLevel
,
Settings
.
gitlab
[
'restricted_visibility_levels'
],
[])
Settings
.
gitlab
[
'username_changing_enabled'
]
=
true
if
Settings
.
gitlab
[
'username_changing_enabled'
].
nil?
Settings
.
gitlab
[
'username_changing_enabled'
]
=
true
if
Settings
.
gitlab
[
'username_changing_enabled'
].
nil?
Settings
.
gitlab
[
'issue_closing_pattern'
]
=
'((?:[Cc]los(?:e[sd]
|ing)|[Ff]ix(?:e[sd]|ing)?
) +(?:(?:issues? +)?#\d+(?:(?:, *| +and +)?))+)'
if
Settings
.
gitlab
[
'issue_closing_pattern'
].
nil?
Settings
.
gitlab
[
'issue_closing_pattern'
]
=
'((?:[Cc]los(?:e[sd]
?|ing)|[Ff]ix(?:e[sd]|ing)?|[Rr]esolv(?:e[sd]?|ing)
) +(?:(?:issues? +)?#\d+(?:(?:, *| +and +)?))+)'
if
Settings
.
gitlab
[
'issue_closing_pattern'
].
nil?
Settings
.
gitlab
[
'default_projects_features'
]
||=
{}
Settings
.
gitlab
[
'default_projects_features'
]
||=
{}
Settings
.
gitlab
[
'webhook_timeout'
]
||=
10
Settings
.
gitlab
[
'webhook_timeout'
]
||=
10
Settings
.
gitlab
.
default_projects_features
[
'issues'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'issues'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'issues'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'issues'
].
nil?
...
...
spec/lib/gitlab/closing_issue_extractor_spec.rb
View file @
fd21d72b
...
@@ -27,13 +27,103 @@ describe Gitlab::ClosingIssueExtractor do
...
@@ -27,13 +27,103 @@ describe Gitlab::ClosingIssueExtractor do
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
end
it
do
message
=
"Closing #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"closing #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"Close #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"close #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"Awesome commit (Fixes #
#{
iid1
}
)"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
it
do
message
=
"Awesome commit (fixes #
#{
iid1
}
)"
message
=
"Awesome commit (fixes #
#{
iid1
}
)"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
end
it
do
it
do
message
=
"Awesome commit (fix #
#{
iid1
}
)"
message
=
"Fixed #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"fixed #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"Fixing #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"fixing #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"Fix #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"fix #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"Awesome commit (Resolves #
#{
iid1
}
)"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"Awesome commit (resolves #
#{
iid1
}
)"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"Resolved #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"resolved #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"Resolving #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"resolving #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"Resolve #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
it
do
message
=
"resolve #
#{
iid1
}
"
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
subject
.
closed_by_message_in_project
(
message
,
project
).
should
==
[
issue
]
end
end
end
end
...
...
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