BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
730712f7
Unverified
Commit
730712f7
authored
Sep 02, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update post-receive worker for new format
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
0306a4e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
post_receive.rb
app/workers/post_receive.rb
+11
-6
No files found.
app/workers/post_receive.rb
View file @
730712f7
...
...
@@ -4,8 +4,7 @@ class PostReceive
sidekiq_options
queue: :post_receive
def
perform
(
repo_path
,
oldrev
,
newrev
,
ref
,
identifier
)
def
perform
(
repo_path
,
identifier
,
changes
)
if
repo_path
.
start_with?
(
Gitlab
.
config
.
gitlab_shell
.
repos_path
.
to_s
)
repo_path
.
gsub!
(
Gitlab
.
config
.
gitlab_shell
.
repos_path
.
to_s
,
""
)
else
...
...
@@ -22,17 +21,23 @@ class PostReceive
return
false
end
user
=
identify
(
identifier
,
project
,
newrev
)
changes
=
changes
.
lines
if
changes
.
kind_of?
(
String
)
changes
.
each
do
|
change
|
oldrev
,
newrev
,
ref
=
change
.
strip
.
split
(
' '
)
unless
user
@user
||=
identify
(
identifier
,
project
,
newrev
)
unless
@user
log
(
"Triggered hook for non-existing user
\"
#{
identifier
}
\"
"
)
return
false
end
if
tag?
(
ref
)
GitTagPushService
.
new
.
execute
(
project
,
user
,
oldrev
,
newrev
,
ref
)
GitTagPushService
.
new
.
execute
(
project
,
@
user
,
oldrev
,
newrev
,
ref
)
else
GitPushService
.
new
.
execute
(
project
,
user
,
oldrev
,
newrev
,
ref
)
GitPushService
.
new
.
execute
(
project
,
@user
,
oldrev
,
newrev
,
ref
)
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