Skip to content

Commit 8161515

Browse files
authored
do not abort gerrit changes on other branch
1 parent da0eaba commit 8161515

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/gerrit/trigger/trigger.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ def handle_patchset_created_project(conn, event, project_id, project_name):
108108
AND b.project_id = c.project_id
109109
WHERE
110110
c.gerrit_change_id = %s AND
111-
j.state in ('scheduled', 'running')
112-
''', [event['change']['id']])
111+
j.state in ('scheduled', 'running') AND
112+
c.branch = %s
113+
''', [event['change']['id'], event['change']['branch']])
113114
c.close()
114115
conn.commit()
115116

0 commit comments

Comments
 (0)