server: remove post_action argument from on_push

Because `on_push` takes only one argument.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-09-27 20:33:58 +02:00
parent 01bed38f31
commit 9ca408c40e
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
1 changed files with 3 additions and 2 deletions

View File

@ -96,7 +96,7 @@ def run_command(command):
def define_push_hook(repo, post_action):
@webhook.hook()
def on_push(data, post_action):
def on_push(data):
branch = remove_prefix(data['ref'], 'refs/heads/')
name = data['repository']['full_name']
@ -114,7 +114,8 @@ def define_push_hook(repo, post_action):
else:
log.info('Updated repo to: %s', after)
if post_action:
if post_action is not None:
log.info('Running post action!')
post_action()
def parse_args():