From c48505f3635499eaf1fa9c395875fd3ba0a4cf84 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Sat, 16 Dec 2023 08:07:58 +0000 Subject: [PATCH] Always update webhook_token on set-hooks --- gitlab_deps/hooks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gitlab_deps/hooks.py b/gitlab_deps/hooks.py index c10727c..c5b26d0 100644 --- a/gitlab_deps/hooks.py +++ b/gitlab_deps/hooks.py @@ -6,6 +6,9 @@ def check_hook(gl, hook_url, webhook_token, project_path, dry_run): found = False for h in project.hooks.list(): if h.url == hook_url and h.pipeline_events: + if not dry_run: + h.token = webhook_token + h.save() found = True break if found: -- GitLab