Skip to content

Commit

Permalink
server: remove post_action argument from on_push
Browse files Browse the repository at this point in the history
Because `on_push` takes only one argument.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed Sep 27, 2023
1 parent 01bed38 commit 9ca408c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions files/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand All @@ -114,7 +114,8 @@ def on_push(data, 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():
Expand Down

0 comments on commit 9ca408c

Please sign in to comment.