Commit graph

132 commits

Author SHA1 Message Date
d54ef5f265 feat: gitlab feature 2026-06-23 17:30:09 +02:00
pep
5fc65c7636
Use author name of the current comment not the one of the issue
Signed-off-by: pep <pep@bouah.net>
2026-06-11 22:03:16 +02:00
pep
43106fc657
Update dependencies
Update xmpp-rs to 559159d4, hmac to 0.13 and sasl to 0.11

Signed-off-by: pep <pep@bouah.net>
2026-05-26 11:45:31 +02:00
pep
be1379f13f
Update xmpp dep to 22292c86c
Signed-off-by: pep <pep@bouah.net>
2026-01-15 18:52:09 +01:00
pep
6647a9ae92 bot: Add 'version' and help (any other message) command
Signed-off-by: pep <pep@bouah.net>
2026-01-08 23:51:11 +01:00
pep
457c40bffe Add build script to make git version available in code
Signed-off-by: pep <pep@bouah.net>
2026-01-08 23:51:11 +01:00
pep
849ecbd5dc bot: pass in Config as a parameter
In an attempt to pass in more stuff to the bot

Signed-off-by: pep <pep@bouah.net>
2026-01-08 23:44:06 +01:00
pep
284aa7dfd1
bot: GC expired recent hooks at each call of the method
Signed-off-by: pep <pep@bouah.net>
2026-01-08 14:09:31 +01:00
pep
0746afb443 bot: Implement hook deduplication
Avoid sending similar (update) event within a certain time frame (5m).

Signed-off-by: pep <pep@bouah.net>
2026-01-08 13:48:15 +01:00
pep
990829d72c hooks: Add updated_at parameter to MergeRequest and Issue hooks
Signed-off-by: pep <pep@bouah.net>
2026-01-08 13:48:15 +01:00
pep
0a02d85563 hooks: Re-export *Action types
Signed-off-by: pep <pep@bouah.net>
2026-01-08 13:48:15 +01:00
pep
1ad82dfeac hooks::types: Implement PartialEq on hooks
Signed-off-by: pep <pep@bouah.net>
2026-01-08 13:48:15 +01:00
pep
c3eee99d2a Revert "config: custom deserializer for nickname"
This is now fixed in xmpp-rs upstream in 6624dffe.

This reverts commit 72a3e5a188.
2026-01-05 19:34:12 +01:00
pep
628595af4d
Missing fmt bits
Signed-off-by: pep <pep@bouah.net>
2026-01-04 15:14:02 +01:00
pep
72a3e5a188
config: custom deserializer for nickname
It looks like the current toml crate doesn't allow borrowed strings?
See https://gitlab.com/xmpp-rs/xmpp-rs/-/merge_requests/638.

This is happening after xmpp-rs' 60bf821c63.

Signed-off-by: pep <pep@bouah.net>
2026-01-01 01:18:45 +01:00
pep
8dfb89fe38
bot: resync on 'rejoin' rather than leave and join
The xmpp crate doesn't yet have mechanisms to wait for the next incoming
presence and so the `leave_room` method returns after the unavailable
presence has been set. Thus the code may still think it's being joined
when it pretty soon going not to be.

Instead, we chose to send another join presence to signal the MUC we
want to get the full state again (occupants, subject), without leaving.

Signed-off-by: pep <pep@bouah.net>
2025-12-28 19:12:31 +01:00
pep
ed1e9829ae
Update changelog
Signed-off-by: pep <pep@bouah.net>
2025-12-27 14:34:07 +01:00
pep
ea62a41b78 Add command to rejoin rooms
Signed-off-by: pep <pep@bouah.net>
2025-12-27 14:31:32 +01:00
pep
478780d063 Add 'admins' config option to be used later on
Signed-off-by: pep <pep@bouah.net>
2025-12-27 14:31:32 +01:00
pep
caa92227b2 fmt update?
Signed-off-by: pep <pep@bouah.net>
2025-12-27 14:31:32 +01:00
pep
1c3af01142
hooks: Remove restriction to be published on main
Signed-off-by: pep <pep@bouah.net>
2025-12-17 16:01:55 +01:00
pep
04bae8dc0c
bot: Display debug end even if hook hasn't been processed
Signed-off-by: pep <pep@bouah.net>
2025-12-17 16:01:23 +01:00
pep
eb0b7ff020
Don't follow bookmarks autojoin config
If this flag is enabled, the library expects bookmarks to be added to
the account itself, and when there's no bookmark for a room, the
corresponding room is automatically left. This doesn't work in the case
where many instances of the bot are on the same account.

It may work in the future if support for various sets of rooms/hooks are
added, but for the moment it seemed easier (and maybe also more useful
for other users of the xmpp-rs lib) to implement this.

Signed-off-by: pep <pep@bouah.net>
2025-11-15 22:00:26 +01:00
pep
a4bbd4fa48
Update dep xmpp-rs to 239a0191
Signed-off-by: pep <pep@bouah.net>
2025-11-13 18:29:28 +01:00
pep
4b0daaf0a1
Update dep camino's features
Signed-off-by: pep <pep@bouah.net>
2025-11-13 18:29:10 +01:00
pep
9bcf1665a6
forgejo-hooks: merged_at attribute is optional
Signed-off-by: pep <pep@bouah.net>
2025-10-29 16:25:53 +01:00
pep
9d43e6085d
Update toml dep to 0.9
Signed-off-by: pep <pep@bouah.net>
2025-08-04 23:51:26 +02:00
pep
3589fe6348
Update edition to 2024
And remove unstable let_chains feature which isn't needed anymore.

Signed-off-by: pep <pep@bouah.net>
2025-07-19 23:03:51 +02:00
pep
f712816c9b
Remove unused unstable feature
Forgot to remove it with e064263f96.

Signed-off-by: pep <pep@bouah.net>
2025-07-19 23:01:43 +02:00
pep
7eb6f190b2
Update xmpp-rs dep to e3a4aae42d9 with rustls fix
Signed-off-by: pep <pep@bouah.net>
2025-05-11 21:48:50 +02:00
pep
c98c61daa1
Update dependencies
Signed-off-by: pep <pep@bouah.net>
2025-05-04 22:46:39 +02:00
pep
b97b5373ba
Use ForgejoHook::try_from_event
Signed-off-by: pep <pep@bouah.net>
2025-05-04 00:25:16 +02:00
pep
222ed138e4
forgejo-hook: impl Hook::try_from_event
Utilize X-Forgejo-Event http header to facilitate conversion.

Signed-off-by: pep <pep@bouah.net>
2025-05-04 00:14:24 +02:00
pep
834268f07f
forgejo-hooks: Add state: "closed" in issues
Signed-off-by: pep <pep@bouah.net>
2025-05-03 23:50:43 +02:00
pep
ca6990114b
Handle closing issues
Signed-off-by: pep <pep@bouah.net>
2025-05-03 22:15:39 +02:00
pep
8d1908c488
Update xmpp-rs upstream to 51ce661f8d
Fixes a traceback on disconnect

Signed-off-by: pep <pep@bouah.net>
2025-05-03 21:10:52 +02:00
pep
e064263f96 Cleanly shutdown on ctrl_c
Signed-off-by: pep <pep@bouah.net>
2025-05-03 17:46:29 +02:00
pep
f90b152abf
Add support for issue comments
Signed-off-by: pep <pep@bouah.net>
2025-05-03 17:33:16 +02:00
pep
96353016d4
forgejo-hooks: Add support for issue comments
Signed-off-by: pep <pep@bouah.net>
2025-05-03 17:32:48 +02:00
pep
29881089d3
Update xmpp-rs upstream to 23c947d081
Signed-off-by: pep <pep@bouah.net>
2025-05-03 12:32:06 +02:00
pep
12330e736d
cusku::hooks::forgejo: Add url to be displayed
Signed-off-by: pep <pep@bouah.net>
2025-04-19 14:30:10 +02:00
pep
14d03272dd
cusku::hooks::forgejo: Use IssueAttrs.numbers rather than Issue.number
Signed-off-by: pep <pep@bouah.net>
2025-04-19 14:28:33 +02:00
pep
5b5de13db0 Allow deprecated elements from gitlab crate
We know they exist. There's no obvious replacement for the moment, so
they'll just stop working when they stop working.

Signed-off-by: pep <pep@bouah.net>
2025-03-11 12:40:35 +01:00
pep
4e0eea9e6c rustfmt for previous commit
Missed it, and it had been pushed for a long time.

Signed-off-by: pep <pep@bouah.net>
2025-03-11 12:40:17 +01:00
pep
9eeca94366
Update to xmpp-rs (ec72d71551) to get serde support for ResourcePart
Signed-off-by: pep <pep@bouah.net>
2024-12-29 21:06:13 +01:00
pep
c29e87be03 Update xmpp dep to main (5bc94dce95)
Signed-off-by: pep <pep@bouah.net>
2024-12-19 23:59:28 +01:00
pep
161c259dee rustfmt
Signed-off-by: pep <pep@bouah.net>
2024-12-19 23:59:28 +01:00
pep
d8d393b180
Update gitlab crate to 0.1706
And discover all the deprecation warnings for Webhooks. That sounds like
we're gonna stop supporting gitlab soon-ish.

Signed-off-by: pep <pep@bouah.net>
2024-12-17 21:07:08 +01:00
pep
456317fb68
Update gitlab dep to 0.1705
Signed-off-by: pep <pep@bouah.net>
2024-11-21 17:28:08 +01:00
pep
d16ead8bc9
Split web and xmpp parts into different tasks
Signed-off-by: pep <pep@bouah.net>
2024-11-21 17:11:43 +01:00