gsaslis / radicle-ci-broker

A placeholder project to use for issue tracking
0 stars 0 forks source link

Start broker as a new process that listens to node events #2

Open Archimidis opened 1 year ago

Archimidis commented 1 year ago

The CI broker should listen to events from radicle-node, e.g. through rad node events.

Archimidis commented 1 year ago

The CI broker subscribes to node events and listens specifically for Event::RefsFetched events. This is where we get information about created or updated patches. The format is the following:

{
    "type": "refs-fetched",
    "remote": "z6MksmpU5b1dS7oaqF2bHXhQi1DWy2hB7Mh9CuN7y1DN6QSz",
    "rid": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
    "updated": [
        {
            "updated": {
                "name":"refs/namespaces/z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/refs/heads/master",
                "old":"64708954ca5e3d561693e44d61169f14a16d09ba",
                "new":"765823c686caa89db0b76c19595189ac1fde4e8e"
            }
        },
        {
            "created": {
                "name":"refs/namespaces/z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/refs/heads/patches/731309bf14ee65adb1287a45121b016ee3a06f03",
                "oid":"a3a223fc645b3d1edcedbaecb6907afdf33362f1"
            }
        },
   ]
}