changeset 52029073a5d3 in trypod:default
details: https://hg.tryton.org/trypod?cmd=changeset&node=52029073a5d3
description:
        Add option to trigger hook based on the commit phase
diffstat:

 hook.py |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 416ae587519f -r 52029073a5d3 hook.py
--- a/hook.py   Wed Mar 17 11:43:38 2021 +0100
+++ b/hook.py   Fri May 07 17:54:34 2021 +0200
@@ -27,6 +27,11 @@
     if repourl:
         repourl += root
 
+    phases = ui.config(b'trypod', b'phases', None)
+    if phases and ctx.phase() not in phases:
+        ui.debug(b'trypod: %s phase ignored\n' % ctx.phase())
+        return
+
     branch = ctx.branch()
     email = unifromlocal(stringutil.email(ctx.user()))
     payload = {

Reply via email to