look master branch name

This commit is contained in:
Simon 2025-08-14 18:00:06 +07:00
parent df28506416
commit 90b748c1d4
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -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"""