check first line only for build trigger

This commit is contained in:
simon 2022-05-20 20:16:02 +07:00
parent 5b75a80ee1
commit f8deb96a5c
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -82,7 +82,8 @@ class GithubHook(WebhookBase):
def check_commit_message(self):
"""check if keyword in commit message is there"""
message = self.hook["head_commit"]["message"]
return message.endswith(self.repo_conf["unstable_keyword"])
first_line = message.split("\n")[0]
return first_line.endswith(self.repo_conf["unstable_keyword"])
def _check_roadmap(self):
"""check if roadmap update needed"""