diff options
author | Robin Jarry <robin@jarry.cc> | 2023-06-25 13:33:44 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-07-01 18:26:35 +0200 |
commit | 91dbd6078192e017b88bf061bb730e9d16ed5088 (patch) | |
tree | edc2f7fcf65b699cc048b5aa5476afea02ae2aed /contrib/ircbot/install-webhook.sh | |
parent | 69094e332779a71ddd47b88bced0992c290d67e7 (diff) | |
download | aerc-91dbd6078192e017b88bf061bb730e9d16ed5088.tar.gz |
contrib: add irc bot stuff
Add a small script to install a sourcehut webhook that triggers on
patchset reception.
Add a limnoria (supybot fork) plugin to receive the webhook requests and
send IRC NOTICE messages on the proper channels.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'contrib/ircbot/install-webhook.sh')
-rwxr-xr-x | contrib/ircbot/install-webhook.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/contrib/ircbot/install-webhook.sh b/contrib/ircbot/install-webhook.sh new file mode 100755 index 00000000..4d737f5b --- /dev/null +++ b/contrib/ircbot/install-webhook.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +set -xe + +hut lists webhook create "https://lists.sr.ht/~rjarry/aerc-devel" \ + --stdin -e patchset_received \ + -u https://bot.diabeteman.com/sourcehut/ <<EOF +query { + webhook { + uuid + event + date + ... on PatchsetEvent { + patchset { + id + subject + version + prefix + list { + name + owner { + ... on User { + canonicalName + } + } + } + submitter { + ... on User { + canonicalName + } + } + } + } + } +} +EOF |