Skip to content

Commit 68db8f6

Browse files
authored
Merge pull request #123 from kellda/skip-edited
Do not re-execute commands in edited comments
2 parents 86945db + c71a744 commit 68db8f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

homu/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,14 +574,15 @@ def fail(err):
574574
state.save()
575575

576576
elif event_type == 'issue_comment':
577+
action = info['action']
577578
body = info['comment']['body']
578579
username = info['comment']['user']['login']
579580
user_id = info['comment']['user']['id']
580581
pull_num = info['issue']['number']
581582

582583
state = g.states[repo_label].get(pull_num)
583584

584-
if 'pull_request' in info['issue'] and state:
585+
if action == 'created' and 'pull_request' in info['issue'] and state:
585586
state.title = info['issue']['title']
586587
state.body = info['issue']['body']
587588

0 commit comments

Comments
 (0)