Commit graph

77 commits

Author SHA1 Message Date
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
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
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
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
db88921290 Readd support for GitlabHook::WikiPage
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
4e330adb6b Remove incomplete support for GitlabHook::Build
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
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
2f101c617c Rename hook module to hooks
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
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
6e6ed92026 hook: Reimplement Hook::Issue for Gitlab
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
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
77c193bfb6 Update to xmpp main (274baaef9afb)
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-08-31 00:40:37 +02:00
9bc8a77da6 Add syntax-highlighting feature
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-08-31 00:39:55 +02:00
xmppftw
7b63e24168
Update to xmpp 0.6
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-08-31 00:39:49 +02:00
xmppftw
ac67c52bee Remove unsafe 2024-08-21 00:11:55 +02:00
xmppftw
94ac2d8818
Save when not is_online
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-08-21 00:11:37 +02:00
xmppftw
6285c0b1a4 Async file read 2024-08-21 00:07:26 +02:00
xmppftw
66e4131bd3 Use Utf8PathBuf
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-08-20 23:47:48 +02:00
xmppftw
ad3bcc88de Move Config to config module 2024-08-20 23:45:00 +02:00
xmppftw
ee4c0a0275 Use Display not Debug for error message 2024-08-20 23:45:00 +02:00
xmppftw
09df210c17 Add per-error HTTP status code 2024-08-20 23:45:00 +02:00
xmppftw
f70b5f8aa1 Don't crash for unknown MR action 2024-08-20 23:45:00 +02:00
xmppftw
f9e6b91451 Log what HTTP method was wrong 2024-08-20 23:45:00 +02:00
xmppftw
ca7a5a8090 Added gitignore 2024-08-20 23:12:35 +02:00
0c1627e726
Move unreachable debug statement
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-26 18:47:24 +02:00
890eb8fba5
Update gitlab dep to 0.1701
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-26 18:47:01 +02:00
42183ea860
Restrict jid dependency version
I still wish I didn't have to, but it seems cargo is pulling 0.11 now
that it's released, when xmpp still depends on 0.10.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-25 09:12:50 +02:00
c707aa5c35
Gitlab Webhook: Support tag pushes
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-24 19:47:01 +02:00
edd0e0074a
Don't calculate sig for payloads that don't need it
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-24 19:44:10 +02:00
a9a16c30bf
Add debug statements to know which branch got triggered
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-14 01:03:15 +02:00
9f55b37f34
Add debug statements to know which branch got triggered
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-14 01:02:35 +02:00
bdbc8b6382
Remove duplicated Gitlab token check
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-14 00:58:33 +02:00
6903490ace
Form GitlabHook payloads again
Don't check for the secret validity at this point

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-10 17:20:45 +02:00
407788af5a
Rename token to secret
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-10 14:18:28 +02:00
1cf93d1ba8
Rename webhook to hook where appropriate
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-10 14:02:35 +02:00
1301275788
Compare payload's hmac signature for forgejo
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-10 13:19:04 +02:00
c7a5740ee5 forgejo-hooks: RemoveBranch event
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-10 02:34:42 +02:00
af3d65e451 forgejo-hooks: Add support for branch pushes
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-10 02:34:42 +02:00
8e94435604
Attempt at Forgejo Webhook support
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-10 02:34:37 +02:00
2ef603151e
Make token config mandatory
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-10 02:09:53 +02:00
d0cb431546
Update dep: bytes
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-09 23:20:19 +02:00
0bf9f107b5
Dissociate content-type and token check
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-04 03:16:58 +02:00
d73e149cb4
Don't enable all tokio features
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-04 00:45:51 +02:00
23666b6219
Don't enable all hyper features
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-04 00:38:03 +02:00
1ffa463fd6
Update dep: hyper
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-04 00:35:40 +02:00
0eb47eac7b
Update dep: clap
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-02 21:52:54 +02:00