aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/ircbot/install-webhook.sh
blob: 1f8f12dd1b900a2b23e22f64ab94e6ad42e7c74f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/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
					}
					... on Mailbox {
						name
						address
					}
				}
			}
		}
	}
}
EOF