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
6f7ccea6
Commit
6f7ccea6
authored
Feb 04, 2013
by
Dmitriy Zaporozhets
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix satellites to use filesystem. Correct post-receive user finder
parent
896c3a0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
app/workers/post_receive.rb
app/workers/post_receive.rb
+5
-2
lib/gitlab/satellite/satellite.rb
lib/gitlab/satellite/satellite.rb
+2
-2
No files found.
app/workers/post_receive.rb
View file @
6f7ccea6
...
@@ -28,10 +28,13 @@ class PostReceive
...
@@ -28,10 +28,13 @@ class PostReceive
elsif
/^[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}$/
.
match
(
identifier
)
elsif
/^[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}$/
.
match
(
identifier
)
User
.
find_by_email
(
identifier
)
User
.
find_by_email
(
identifier
)
else
else
Key
.
find_by_identifier
(
identifier
).
try
(
:user
)
User
.
find_by_username
(
identifier
.
strip
)
end
end
return
false
unless
user
unless
user
Gitlab
::
GitLogger
.
error
(
"POST-RECEIVE: Triggered hook for non-existing user
\"
#{
identifier
}
\"
"
)
return
false
end
project
.
trigger_post_receive
(
oldrev
,
newrev
,
ref
,
user
)
project
.
trigger_post_receive
(
oldrev
,
newrev
,
ref
,
user
)
end
end
...
...
lib/gitlab/satellite/satellite.rb
View file @
6f7ccea6
...
@@ -30,10 +30,10 @@ module Gitlab
...
@@ -30,10 +30,10 @@ module Gitlab
end
end
def
create
def
create
output
,
status
=
popen
(
"git clone
#{
project
.
url
_to_repo
}
#{
path
}
"
,
output
,
status
=
popen
(
"git clone
#{
project
.
repository
.
path
_to_repo
}
#{
path
}
"
,
Gitlab
.
config
.
satellites
.
path
)
Gitlab
.
config
.
satellites
.
path
)
log
(
"PID:
#{
project
.
id
}
: git clone
#{
project
.
url
_to_repo
}
#{
path
}
"
)
log
(
"PID:
#{
project
.
id
}
: git clone
#{
project
.
repository
.
path
_to_repo
}
#{
path
}
"
)
log
(
"PID:
#{
project
.
id
}
: ->
#{
output
}
"
)
log
(
"PID:
#{
project
.
id
}
: ->
#{
output
}
"
)
if
status
.
zero?
if
status
.
zero?
...
...
Alain Takoudjou
@alain.takoudjou
mentioned in commit
06bb7945
·
May 03, 2017
mentioned in commit
06bb7945
mentioned in commit 06bb79456cff992c869d9bdc4904f317de4ba4d8
Toggle commit list
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