got-notify-http: refactor jsonify()
commit20d96a10d5e54c5ff61a9ce5a53439d063a0805c
authorOmar Polo <op@omarpolo.com>
Thu, 28 Mar 2024 13:07:56 +0000 (28 13:07 +0000)
committerThomas Adam <thomas@xteddy.org>
Sat, 30 Mar 2024 17:21:23 +0000 (30 17:21 +0000)
treee4c411f57c4a1075ab4d5cf56ca1c7a96f0f4397
parentdada399a5c3d460b46744b7270bb9b07b44c42c8
got-notify-http: refactor jsonify()

To support the other types of notifications, we can't just peek at
the first byte and decide wether it's a short or long format.
Refactor the parsing so that there's one main entrypoint, jsonify(),
that calls jsonify_comment() or jsonify_comment_short() depending
on the format of the line.  Other "line types" will be added as a
follow-up to support the other notification types.
gotd/libexec/got-notify-http/got-notify-http.c