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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
34975f01
Commit
34975f01
authored
Aug 11, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Create activity event and execute hooks on web editor commit"
This reverts commit
3d416f16
.
parent
24332b7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
11 deletions
+3
-11
app/services/files/base_service.rb
app/services/files/base_service.rb
+0
-6
app/services/files/create_service.rb
app/services/files/create_service.rb
+2
-3
app/services/files/update_service.rb
app/services/files/update_service.rb
+1
-2
No files found.
app/services/files/base_service.rb
View file @
34975f01
...
@@ -13,11 +13,5 @@ module Files
...
@@ -13,11 +13,5 @@ module Files
def
repository
def
repository
project
.
repository
project
.
repository
end
end
def
after_commit
(
sha
)
commit
=
repository
.
commit
(
sha
)
full_ref
=
'refs/heads/'
+
(
params
[
:new_branch
]
||
ref
)
GitPushService
.
new
.
execute
(
project
,
current_user
,
commit
.
parent_id
,
sha
,
full_ref
)
end
end
end
end
end
app/services/files/create_service.rb
View file @
34975f01
...
@@ -40,7 +40,7 @@ module Files
...
@@ -40,7 +40,7 @@ module Files
params
[
:content
]
params
[
:content
]
end
end
sha
=
repository
.
commit_file
(
created_successfully
=
repository
.
commit_file
(
current_user
,
current_user
,
file_path
,
file_path
,
content
,
content
,
...
@@ -49,8 +49,7 @@ module Files
...
@@ -49,8 +49,7 @@ module Files
)
)
if
sha
if
created_successfully
after_commit
(
sha
)
success
success
else
else
error
(
"Your changes could not be committed, because the file has been changed"
)
error
(
"Your changes could not be committed, because the file has been changed"
)
...
...
app/services/files/update_service.rb
View file @
34975f01
...
@@ -26,7 +26,7 @@ module Files
...
@@ -26,7 +26,7 @@ module Files
params
[
:content
]
params
[
:content
]
end
end
sha
=
repository
.
commit_file
(
repository
.
commit_file
(
current_user
,
current_user
,
path
,
path
,
content
,
content
,
...
@@ -34,7 +34,6 @@ module Files
...
@@ -34,7 +34,6 @@ module Files
params
[
:new_branch
]
||
ref
params
[
:new_branch
]
||
ref
)
)
after_commit
(
sha
)
success
success
rescue
Gitlab
::
Satellite
::
CheckoutFailed
=>
ex
rescue
Gitlab
::
Satellite
::
CheckoutFailed
=>
ex
error
(
"Your changes could not be committed because ref '
#{
ref
}
' could not be checked out"
,
400
)
error
(
"Your changes could not be committed because ref '
#{
ref
}
' could not be checked out"
,
400
)
...
...
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