Commit graph

14 commits

Author SHA1 Message Date
Vincent Ambo
2fc64dc277 fix(clbot): Use change *owner* and not *uploader*
In autosubmit cases that require rebases, the change *uploader* might
be clbot which would cause besadii to use clbot as the owner.

This is incorrect, but luckily the change-merged event has an actual
owner field instead.

Change-Id: Ia35b52085f94628e61eb358807b3b85565521b60
2021-12-10 13:50:14 +00:00
Vincent Ambo
7e3308df64 feat(fun/clbot): Add distinct messages for auto-submitted CLs
Detects autosubmitted CLs (other people's CLs submitted by clbot) and
modifies the text submitted to IRC accordingly.

If a CL is autosubmitted, we opt to highlight its author rather than
invoking noping.

Change-Id: Ibc21b7eeb2f0f2087097404baef6976384d68b09
2021-12-10 15:34:53 +03:00
Vincent Ambo
780bb86eff chore: Replace Freenode mentions with HackInt
This doesn't replace all of them in the repo, but at least the ones
that are relevant to our move.

Change-Id: I842e7594b4c16af30d880272417874f6b29afd22
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3134
Tested-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: grfn <grfn@gws.fyi>
2021-05-22 21:37:13 +00:00
Vincent Ambo
a7b168ec9a feat(clbot): Add a flag to disable TLS connections
The local bouncer on whitby does not use TLS.

Change-Id: Idf9c56f94129b0ddce620eb559082a8f2f088078
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3128
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-05-22 17:54:31 +00:00
Luke Granger-Brown
23d8e89f03 chore(clbot): reformat messages
Instead of putting the subject in quotes, we instead reorder the message
to be of the format:

CL/2768 applied by lukegb - chore(clbot): reformat messages - https://cl.tvl.fyi/2768

Change-Id: I77d19525c399396a91797f423bdfc92069d47f9f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2768
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2021-04-02 20:05:02 +00:00
Vincent Ambo
b508605084 fix(clbot): Avoid pinging users for their own user folder CLs
Instead of only "nopinging" the username in the templated message,
replace all instances of the CL owner's name with one that does
not (tries to not) highlight them.

This way, CLs sent to another user's folder will still highlight them.

Change-Id: I9a3d8563ab32befc1a1b1412851026343c170dd3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2688
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: lukegb <lukegb@tvl.fyi>
2021-03-28 01:21:42 +00:00
isomer
2b4abca80f fix(clbot): s/submitted/applied/
By vote of the IRC channel.

Change-Id: I5ea965d45a7d73b0bdcae817d16eaa17e47adcbc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/861
Reviewed-by: isomer <isomer@tvl.fyi>
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: BuildkiteCI
Tested-by: BuildkiteCI
2020-07-02 18:55:30 +00:00
Luke Granger-Brown
f2980dfc16 feat(clbot): allow specifying branch and repo to look at on command line
Change-Id: Ib2e37275d770a1e98a526481018514a564a4f73b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/569
Reviewed-by: tazjin <mail@tazj.in>
2020-06-24 01:46:29 +00:00
Luke Granger-Brown
6a77bbbf84 fix(clbot): actually display people's usernames properly
Change-Id: Idcbb6ffbb3127520141596cea7883cd137a1ea56
Reviewed-on: https://cl.tvl.fyi/c/depot/+/441
Reviewed-by: eta <eta@theta.eu.org>
Reviewed-by: riking <rikingcoding@gmail.com>
2020-06-16 18:42:40 +00:00
eta
4c22cf3169 feat(clbot): insert Unicode ZWS to avoid pinging users
Change-Id: I732bf6daa01f5b2099c4f4cbdd21a2ceedc79cb1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/385
Reviewed-by: q3k <q3k@q3k.org>
Reviewed-by: lukegb <lukegb@tvl.fyi>
2020-06-16 13:29:14 +00:00
Luke Granger-Brown
b6ae678335 feat(clbot): Add IRC support to the IRC bot.
Change-Id: I183488824882750c46e7216b98ab48e1d8f48096
Reviewed-on: https://cl.tvl.fyi/c/depot/+/343
Reviewed-by: eta <eta@theta.eu.org>
Reviewed-by: tazjin <mail@tazj.in>
2020-06-16 12:10:56 +00:00
Luke Granger-Brown
9099497185 chore(clbot): Refactor backoff utility into a separate package.
It'll be reused by the IRC side of things too.

Change-Id: I3d84f3fd5fca6a6d948f331143b14f096d10675d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/342
Reviewed-by: tazjin <mail@tazj.in>
2020-06-15 16:48:58 +00:00
Luke Granger-Brown
5acd03817a chore(clbot): Add signal handler to make clbot shutdown cleanly on SIGINT.
Change-Id: I3c6eeeb99f9d81cdbcb10880c9075ac94c4f5d19
Reviewed-on: https://cl.tvl.fyi/c/depot/+/341
Reviewed-by: tazjin <mail@tazj.in>
2020-06-15 16:48:58 +00:00
Luke Granger-Brown
c05803ff14 feat(clbot): Create Gerrit watcher and basic clbot binary.
gerrit.Watcher is a class which watches the Gerrit stream-events SSH
connection and produces events.

There's a basic CLBot binary as well, to demonstrate driving it to
produce messages on the logging output. It doesn't really do anything
else.

Change-Id: I274fe0a77c8329f79456425405e2fbdc3ca2edf0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/245
Reviewed-by: tazjin <mail@tazj.in>
2020-06-14 17:16:32 +00:00