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
Léo-Paul Géneau
gitlab-ce
Commits
71857224
Commit
71857224
authored
Sep 14, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean environment variables when running git hooks
parent
0a8b6630
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
CHANGELOG
CHANGELOG
+1
-0
lib/gitlab/git/hook.rb
lib/gitlab/git/hook.rb
+7
-5
No files found.
CHANGELOG
View file @
71857224
...
@@ -135,6 +135,7 @@ v 8.12.0 (unreleased)
...
@@ -135,6 +135,7 @@ v 8.12.0 (unreleased)
- Return 204 instead of 404 for /ci/api/v1/builds/register.json if no builds are scheduled for a runner !6225
- Return 204 instead of 404 for /ci/api/v1/builds/register.json if no builds are scheduled for a runner !6225
- Fix Gitlab::Popen.popen thread-safety issue
- Fix Gitlab::Popen.popen thread-safety issue
- Add specs to removing project (Katarzyna Kobierska Ula Budziszewska)
- Add specs to removing project (Katarzyna Kobierska Ula Budziszewska)
- Clean environment variables when running git hooks
v 8.11.6
v 8.11.6
- Fix unnecessary horizontal scroll area in pipeline visualizations. !6005
- Fix unnecessary horizontal scroll area in pipeline visualizations. !6005
...
...
lib/gitlab/git/hook.rb
View file @
71857224
...
@@ -17,11 +17,13 @@ module Gitlab
...
@@ -17,11 +17,13 @@ module Gitlab
def
trigger
(
gl_id
,
oldrev
,
newrev
,
ref
)
def
trigger
(
gl_id
,
oldrev
,
newrev
,
ref
)
return
[
true
,
nil
]
unless
exists?
return
[
true
,
nil
]
unless
exists?
case
name
Bundler
.
with_clean_env
do
when
"pre-receive"
,
"post-receive"
case
name
call_receive_hook
(
gl_id
,
oldrev
,
newrev
,
ref
)
when
"pre-receive"
,
"post-receive"
when
"update"
call_receive_hook
(
gl_id
,
oldrev
,
newrev
,
ref
)
call_update_hook
(
gl_id
,
oldrev
,
newrev
,
ref
)
when
"update"
call_update_hook
(
gl_id
,
oldrev
,
newrev
,
ref
)
end
end
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