Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webhook-listener
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benedikt von St. Vieth
webhook-listener
Commits
357c38ce
Commit
357c38ce
authored
Feb 24, 2017
by
Benedikt von St. Vieth
Browse files
Options
Downloads
Patches
Plain Diff
Enable GitLab Pipeline Hooks.
parent
518b356a
Branches
master
No related tags found
No related merge requests found
Pipeline
#16047
passed
Jan 11, 2019
Stage: test
Changes
1
Pipelines
4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
hooker/gitlab.py
+8
-0
8 additions, 0 deletions
hooker/gitlab.py
with
8 additions
and
0 deletions
hooker/gitlab.py
+
8
−
0
View file @
357c38ce
...
@@ -41,6 +41,14 @@ def assess_reload(request):
...
@@ -41,6 +41,14 @@ def assess_reload(request):
return
True
return
True
else
:
else
:
return
False
return
False
elif
webhook_action
==
u
'
Pipeline Hook
'
:
payload
=
request
.
get_json
()
if
payload
and
payload
[
'
object_attributes
'
][
'
status
'
]
==
'
success
'
:
logging
.
debug
(
'
Got successfull pipeline from gitlab with id {}
'
'
,reload
'
.
format
(
payload
[
'
object_attributes
'
][
'
id
'
]))
return
True
else
:
return
False
elif
webhook_action
==
u
'
Push Hook
'
:
elif
webhook_action
==
u
'
Push Hook
'
:
logging
.
debug
(
'
Got push from gitlab, reload
'
)
logging
.
debug
(
'
Got push from gitlab, reload
'
)
return
True
return
True
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment