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
Boxiang Sun
gitlab-ce
Commits
49f977d6
Commit
49f977d6
authored
Apr 02, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
928fbeee
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
11 deletions
+5
-11
app/services/issues/close_service.rb
app/services/issues/close_service.rb
+1
-1
app/services/issues/create_service.rb
app/services/issues/create_service.rb
+1
-1
app/services/issues/reopen_service.rb
app/services/issues/reopen_service.rb
+1
-1
app/services/issues/update_service.rb
app/services/issues/update_service.rb
+1
-1
spec/services/git_push_service_spec.rb
spec/services/git_push_service_spec.rb
+1
-7
No files found.
app/services/issues/close_service.rb
View file @
49f977d6
module
Issues
class
CloseService
<
BaseService
class
CloseService
<
Issues
::
BaseService
def
execute
(
issue
,
commit
=
nil
)
if
issue
.
close
notification_service
.
close_issue
(
issue
,
current_user
)
...
...
app/services/issues/create_service.rb
View file @
49f977d6
module
Issues
class
CreateService
<
BaseService
class
CreateService
<
Issues
::
BaseService
def
execute
issue
=
project
.
issues
.
new
(
params
)
issue
.
author
=
current_user
...
...
app/services/issues/reopen_service.rb
View file @
49f977d6
module
Issues
class
ReopenService
<
BaseService
class
ReopenService
<
Issues
::
BaseService
def
execute
(
issue
)
if
issue
.
reopen
event_service
.
reopen_issue
(
issue
,
current_user
)
...
...
app/services/issues/update_service.rb
View file @
49f977d6
module
Issues
class
UpdateService
<
BaseService
class
UpdateService
<
Issues
::
BaseService
def
execute
(
issue
)
state
=
params
.
delete
(
'state_event'
)
...
...
spec/services/git_push_service_spec.rb
View file @
49f977d6
...
...
@@ -170,16 +170,10 @@ describe GitPushService do
Issue
.
find
(
issue
.
id
).
should
be_closed
end
it
"passes the closing commit as a thread-local"
do
service
.
execute
(
project
,
user
,
@oldrev
,
@newrev
,
@ref
)
Thread
.
current
[
:current_commit
].
should
==
closing_commit
end
it
"doesn't create cross-reference notes for a closing reference"
do
expect
{
service
.
execute
(
project
,
user
,
@oldrev
,
@newrev
,
@ref
)
}.
not_to
change
{
Note
.
where
(
project_id:
project
.
id
,
system:
true
).
count
}
}.
not_to
change
{
Note
.
where
(
project_id:
project
.
id
,
system:
true
,
commit_id:
closing_commit
.
id
).
count
}
end
it
"doesn't close issues when pushed to non-default branches"
do
...
...
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