From 90b748c1d47cae21bfd964dcce048ad65ca99eff Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 14 Aug 2025 18:00:06 +0700 Subject: [PATCH] look master branch name --- tubearchivist/web/src/webhook_github.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tubearchivist/web/src/webhook_github.py b/tubearchivist/web/src/webhook_github.py index 702d641..afbb09f 100644 --- a/tubearchivist/web/src/webhook_github.py +++ b/tubearchivist/web/src/webhook_github.py @@ -96,10 +96,7 @@ class GithubHook(WebhookBase): def check_branch(self): """check if commit on master branch""" - master_branch = self.hook["repository"]["master_branch"] - ref = self.hook["ref"] - - return ref.endswith(master_branch) + return self.hook.get("ref") == "refs/heads/master" def check_commit_message(self): """check if keyword in commit message is there"""