Commit graph

110 commits

Author SHA1 Message Date
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
pep
fc0b13079f Add support for ForgejoHook::Issue
Signed-off-by: pep <pep@bouah.net>
2024-09-04 23:49:16 +02:00
pep
468b42abfd Add trace log for payloads
Signed-off-by: pep <pep@bouah.net>
2024-09-04 23:49:16 +02:00
pep
6e7462f54d forgejo-hooks: Rename issue-new test to issue-opened
Signed-off-by: pep <pep@bouah.net>
2024-09-04 23:49:16 +02:00
pep
0ec50d7d74 forgejo-hooks: Add IssueAction::Edited
Signed-off-by: pep <pep@bouah.net>
2024-09-04 23:49:16 +02:00
pep
f50a6dab52 forgejo-hooks: add test for Issue without assignees
Signed-off-by: pep <pep@bouah.net>
2024-09-04 23:45:48 +02:00
pep
f6b031eb1f Remove unused Arc/Mutex
Signed-off-by: pep <pep@bouah.net>
2024-09-04 23:45:48 +02:00
pep
a6195d68de forgejo-hooks: Add support for Issue
Signed-off-by: pep <pep@bouah.net>
2024-09-04 23:45:45 +02:00
pep
5979b049f9 forgejo-hooks: Add/modify Push attributes
Compare with forgejo code and tests

Signed-off-by: pep <pep@bouah.net>
2024-09-04 21:22:50 +02:00
pep
25eeacde7c forgejo-hooks: Add failing tests
Signed-off-by: pep <pep@bouah.net>
2024-09-04 21:17:02 +02:00
Maxime “pep” Buquet
979dc50644 forgejo-hooks: license: AGPL-3.0-or-later
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 21:17:02 +02:00
Maxime “pep” Buquet
a557a78417 Add AGPL-3.0-or-later LICENSE file
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 21:17:02 +02:00
Maxime “pep” Buquet
962fc592ee forgejo-hooks: Introduce chrono dep
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 21:16:25 +02:00
pep
38b366204b
forgejo-hooks: cargo fmt
Signed-off-by: pep <pep@bouah.net>
2024-09-04 20:38:48 +02:00
Maxime “pep” Buquet
db88921290 Readd support for GitlabHook::WikiPage
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
4e330adb6b Remove incomplete support for GitlabHook::Build
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
4bbb3f8994 Split hook modules
Some structs changed to public on the way to facilitate writes.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
2f101c617c Rename hook module to hooks
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
b281cf8b44 Readd support for Gitlab's NoteHook
Trying to reuse other converters so that we don't have to redo all the
work

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
6e6ed92026 hook: Reimplement Hook::Issue for Gitlab
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
bcc8728cc8 Refactor hook module to also format Forgejo stuff
Temporarily disable some Gitlab features

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
77c193bfb6 Update to xmpp main (274baaef9afb)
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-08-31 00:40:37 +02:00
Maxime “pep” Buquet
9bc8a77da6 Add syntax-highlighting feature
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-08-31 00:39:55 +02:00