From 622eda5a998c2014501430a2f937f528b541650a Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 24 Jun 2019 18:32:20 +0100 Subject: Don't show webhook notifications for private repos --- modules/git_webhooks/gitea.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/git_webhooks/gitea.py') diff --git a/modules/git_webhooks/gitea.py b/modules/git_webhooks/gitea.py index 78c356ea..536925ac 100644 --- a/modules/git_webhooks/gitea.py +++ b/modules/git_webhooks/gitea.py @@ -44,6 +44,11 @@ COMMENT_ACTIONS = { } class Gitea(object): + def is_private(self, data, headers): + if "repository" in data: + return data["repository"]["private"] + return False + def names(self, data, headers): full_name = None repo_username = None -- cgit v1.3.1-10-gc9f91