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
f08464c0
Commit
f08464c0
authored
Mar 25, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove author_id_of_changes from app
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
80daf9a7
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
12 additions
and
23 deletions
+12
-23
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+1
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-1
app/controllers/projects/milestones_controller.rb
app/controllers/projects/milestones_controller.rb
+1
-2
app/models/concerns/issuable.rb
app/models/concerns/issuable.rb
+0
-2
app/models/issue.rb
app/models/issue.rb
+1
-2
app/models/merge_request.rb
app/models/merge_request.rb
+1
-1
app/models/milestone.rb
app/models/milestone.rb
+2
-3
app/observers/activity_observer.rb
app/observers/activity_observer.rb
+1
-5
app/services/merge_requests/auto_merge_service.rb
app/services/merge_requests/auto_merge_service.rb
+1
-2
app/services/merge_requests/base_merge_service.rb
app/services/merge_requests/base_merge_service.rb
+2
-2
app/services/merge_requests/merge_service.rb
app/services/merge_requests/merge_service.rb
+1
-2
No files found.
app/controllers/projects/issues_controller.rb
View file @
f08464c0
...
...
@@ -76,7 +76,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
def
update
@issue
.
update_attributes
(
params
[
:issue
]
.
merge
(
author_id_of_changes:
current_user
.
id
)
)
@issue
.
update_attributes
(
params
[
:issue
])
@issue
.
reset_events_cache
respond_to
do
|
format
|
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
f08464c0
...
...
@@ -109,7 +109,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
params
[
:merge_request
].
delete
(
:source_project_id
)
params
[
:merge_request
].
delete
(
:target_project_id
)
if
@merge_request
.
update_attributes
(
params
[
:merge_request
]
.
merge
(
author_id_of_changes:
current_user
.
id
)
)
if
@merge_request
.
update_attributes
(
params
[
:merge_request
])
@merge_request
.
reset_events_cache
respond_to
do
|
format
|
...
...
app/controllers/projects/milestones_controller.rb
View file @
f08464c0
...
...
@@ -38,7 +38,6 @@ class Projects::MilestonesController < Projects::ApplicationController
def
create
@milestone
=
@project
.
milestones
.
new
(
params
[
:milestone
])
@milestone
.
author_id_of_changes
=
current_user
.
id
if
@milestone
.
save
redirect_to
project_milestone_path
(
@project
,
@milestone
)
...
...
@@ -48,7 +47,7 @@ class Projects::MilestonesController < Projects::ApplicationController
end
def
update
@milestone
.
update_attributes
(
params
[
:milestone
]
.
merge
(
author_id_of_changes:
current_user
.
id
)
)
@milestone
.
update_attributes
(
params
[
:milestone
])
respond_to
do
|
format
|
format
.
js
...
...
app/models/concerns/issuable.rb
View file @
f08464c0
...
...
@@ -37,8 +37,6 @@ module Issuable
allow_nil:
true
,
prefix:
true
attr_accessor
:author_id_of_changes
attr_mentionable
:title
,
:description
end
...
...
app/models/issue.rb
View file @
f08464c0
...
...
@@ -30,8 +30,7 @@ class Issue < ActiveRecord::Base
scope
:of_user_team
,
->
(
team
)
{
where
(
project_id:
team
.
project_ids
,
assignee_id:
team
.
member_ids
)
}
attr_accessible
:title
,
:assignee_id
,
:position
,
:description
,
:milestone_id
,
:label_list
,
:author_id_of_changes
,
:state_event
:milestone_id
,
:label_list
,
:state_event
acts_as_taggable_on
:labels
...
...
app/models/merge_request.rb
View file @
f08464c0
...
...
@@ -38,7 +38,7 @@ class MergeRequest < ActiveRecord::Base
delegate
:commits
,
:diffs
,
:last_commit
,
:last_commit_short_sha
,
to: :merge_request_diff
,
prefix:
nil
attr_accessible
:title
,
:assignee_id
,
:source_project_id
,
:source_branch
,
:target_project_id
,
:target_branch
,
:milestone_id
,
:
author_id_of_changes
,
:
state_event
,
:description
attr_accessible
:title
,
:assignee_id
,
:source_project_id
,
:source_branch
,
:target_project_id
,
:target_branch
,
:milestone_id
,
:state_event
,
:description
attr_accessor
:should_remove_source_branch
...
...
app/models/milestone.rb
View file @
f08464c0
...
...
@@ -16,8 +16,7 @@
class
Milestone
<
ActiveRecord
::
Base
include
InternalId
attr_accessible
:title
,
:description
,
:due_date
,
:state_event
,
:author_id_of_changes
attr_accessor
:author_id_of_changes
attr_accessible
:title
,
:description
,
:due_date
,
:state_event
belongs_to
:project
has_many
:issues
...
...
@@ -89,6 +88,6 @@ class Milestone < ActiveRecord::Base
end
def
author_id
author_id_of_changes
nil
end
end
app/observers/activity_observer.rb
View file @
f08464c0
...
...
@@ -2,8 +2,6 @@ class ActivityObserver < BaseObserver
observe
:issue
,
:note
,
:milestone
def
after_create
(
record
)
event_author_id
=
record
.
author_id
if
record
.
kind_of?
(
Note
)
# Skip system notes, like status changes and cross-references.
return
true
if
record
.
system?
...
...
@@ -12,9 +10,7 @@ class ActivityObserver < BaseObserver
return
true
if
record
.
noteable_type
.
blank?
end
if
event_author_id
create_event
(
record
,
Event
.
determine_action
(
record
))
end
create_event
(
record
,
Event
.
determine_action
(
record
))
if
current_user
end
def
after_close
(
record
,
transition
)
...
...
app/services/merge_requests/auto_merge_service.rb
View file @
f08464c0
...
...
@@ -9,11 +9,10 @@ module MergeRequests
merge_request
.
lock
if
Gitlab
::
Satellite
::
MergeAction
.
new
(
current_user
,
merge_request
).
merge!
(
commit_message
)
merge_request
.
author_id_of_changes
=
current_user
.
id
merge_request
.
merge
notification
.
merge_mr
(
merge_request
,
current_user
)
create_merge_event
(
merge_request
)
create_merge_event
(
merge_request
,
current_user
)
execute_project_hooks
(
merge_request
)
true
...
...
app/services/merge_requests/base_merge_service.rb
View file @
f08464c0
...
...
@@ -7,13 +7,13 @@ module MergeRequests
NotificationService
.
new
end
def
create_merge_event
(
merge_request
)
def
create_merge_event
(
merge_request
,
current_user
)
Event
.
create
(
project:
merge_request
.
target_project
,
target_id:
merge_request
.
id
,
target_type:
merge_request
.
class
.
name
,
action:
Event
::
MERGED
,
author_id:
merge_request
.
author_id_of_changes
author_id:
current_user
.
id
)
end
...
...
app/services/merge_requests/merge_service.rb
View file @
f08464c0
...
...
@@ -7,11 +7,10 @@ module MergeRequests
# to target branch
class
MergeService
<
BaseMergeService
def
execute
(
merge_request
,
current_user
,
commit_message
)
merge_request
.
author_id_of_changes
=
current_user
.
id
merge_request
.
merge
notification
.
merge_mr
(
merge_request
,
current_user
)
create_merge_event
(
merge_request
)
create_merge_event
(
merge_request
,
current_user
)
execute_project_hooks
(
merge_request
)
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