Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 610 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 610 Bytes

Run arbitrary python code from gerrit stream events

usage: ssh review gerrit stream-events | python main.py

config includes an event type, filter, and a list of callable python functions that will be called if the filter matches. Functions will always be called with the raw event dict as the first argument to the function.

- name: www-buildkite
  type: ref-updated
  filter:
    refUpdate.project: LineageOS/android_packages_apps_DeskClock
  callables:
    test.TestFunc:
      name: www-preview

Example test.py:

def TestFunc(event, name) -> None:
    print(event, name)