Compare commits

...

209 Commits

Author SHA1 Message Date
release-bot
376a34fc2e [maven-release-plugin] prepare release sissi-1.4.45 2024-02-28 20:49:53 +00:00
Sheldan
5ed0c89014 [SIS-xxx] updating abstracto version 2024-02-28 21:46:46 +01:00
Sheldan
2351787221 [SIS-xxx] fixing not handling quotes in titles for orf news post 2024-02-22 19:22:03 +01:00
release-bot
ca6e64832a Commit from GitHub Actions (Publishes a new version of Sissi) 2024-02-19 00:03:00 +00:00
release-bot
8334562e2b [maven-release-plugin] prepare for next development iteration 2024-02-18 23:58:43 +00:00
release-bot
07b4de5df8 [maven-release-plugin] prepare release sissi-1.4.44 2024-02-18 23:58:42 +00:00
Sheldan
17933f9a22 [SIS-xxx] adding token to github release action 2024-02-19 00:55:43 +01:00
Sheldan
12d564e5cd [SIS-xxx] updating abstracto version
removing not needed dbchangelog
adding creation of release to release job
updating docker base images
2024-02-19 00:50:23 +01:00
Sheldan
e097fbe0ef [SIS-xxx] switching local deployment to use postgres chart instead 2024-02-13 00:34:49 +01:00
Sheldan
8639038be2 [SIS-xxx] enabling sticky roles module 2024-02-12 23:01:31 +01:00
release-bot
295abaf4cf Commit from GitHub Actions (Publishes a new version of Sissi) 2024-02-09 22:43:43 +00:00
release-bot
de478506fc [maven-release-plugin] prepare for next development iteration 2024-02-09 22:38:38 +00:00
release-bot
b0b3db0a44 [maven-release-plugin] prepare release sissi-1.4.43 2024-02-09 22:38:36 +00:00
Sheldan
ed5e4ea5a7 [SIS-xxx] updating abstracto version 2024-02-09 23:28:25 +01:00
Sheldan
627229ebd9 [SIS-xxx] removing old release workflow 2024-02-04 20:48:55 +01:00
Sheldan
f4300070b9 [SIS-xxx] adding *.tgz to gitignore file 2024-02-03 20:24:06 +01:00
release-bot
725a0c4f2c Commit from GitHub Actions (Publishes a new version of Sissi) 2024-02-03 19:22:05 +00:00
release-bot
1fbeb880b7 [maven-release-plugin] prepare for next development iteration 2024-02-03 19:18:05 +00:00
release-bot
7a327deab9 [maven-release-plugin] prepare release sissi-1.4.42 2024-02-03 19:18:03 +00:00
Sheldan
a1f0cf58b9 [SIS-xxx] fixing syntax in release job 2024-02-03 20:15:33 +01:00
release-bot
2e7caa80bb [maven-release-plugin] prepare for next development iteration 2024-02-03 18:41:20 +00:00
release-bot
32e80a5b84 [maven-release-plugin] prepare release sissi-1.4.41 2024-02-03 18:41:18 +00:00
Sheldan
96a230f347 [SIS-xxx] changing github repository setup 2024-02-03 19:33:43 +01:00
release-bot
88a4d45d22 [maven-release-plugin] prepare for next development iteration 2024-02-03 18:14:40 +00:00
release-bot
858317a7f4 [maven-release-plugin] prepare release sissi-1.4.40 2024-02-03 18:14:38 +00:00
Sheldan
b69c873efe [SIS-xxx] changing permissions of token 2024-02-03 19:11:49 +01:00
release-bot
c93be84aef [maven-release-plugin] prepare for next development iteration 2024-02-03 17:56:07 +00:00
release-bot
a61a128236 [maven-release-plugin] prepare release sissi-1.4.39 2024-02-03 17:56:06 +00:00
Sheldan
a1b2700092 [SIS-xxx] updating general version due to release
updating more versions when doing manual release job
2024-02-03 18:53:04 +01:00
Sheldan
da7cc2f6a7 [SIS-xxx] fixing scm config 2024-02-03 18:47:40 +01:00
Sheldan
4cb118339f [SIS-xxx] adding missing variables to release job 2024-02-03 18:39:27 +01:00
Sheldan
11460f1e19 [SIS-xxx] fixing name in release job 2024-02-03 18:27:35 +01:00
Sheldan
c9b856b300 [SIS-xxx] adding manual release job 2024-02-03 18:13:25 +01:00
Sheldan
c513087d30 [SIS-xxx] updating abstracto version 2024-02-03 18:07:24 +01:00
Sheldan
8a110215f1 [maven-release-plugin] prepare for next development iteration 2024-01-24 08:50:30 +01:00
Sheldan
90b9c3674c [maven-release-plugin] prepare release sissi-1.4.37 2024-01-24 08:50:26 +01:00
Sheldan
68771a7b26 [SIS-xxx] updating abstracto version and preparing for release 2024-01-24 08:28:39 +01:00
Sheldan
72e7bb57e3 [maven-release-plugin] prepare for next development iteration 2023-12-29 00:51:26 +01:00
Sheldan
3e147a37d9 [maven-release-plugin] prepare release sissi-1.4.36 2023-12-29 00:51:22 +01:00
Sheldan
99dca4906a [SIS-xxx] updating abstracto and preparing for release 2023-12-29 00:27:23 +01:00
Sheldan
32bfefc5b2 [maven-release-plugin] prepare for next development iteration 2023-12-28 22:56:31 +01:00
Sheldan
aa135b4663 [maven-release-plugin] prepare release sissi-1.4.35 2023-12-28 22:56:27 +01:00
Sheldan
4ffb5e5640 [SIS-xxx] updating abstracto and preparing for release 2023-12-28 22:40:16 +01:00
Sheldan
9376ac416f [maven-release-plugin] prepare for next development iteration 2023-12-26 21:29:35 +01:00
Sheldan
7cf44c99b7 [maven-release-plugin] prepare release sissi-1.4.34 2023-12-26 21:29:31 +01:00
Sheldan
5dce059d2b [SIS-xxx] updating abstracto and preparing for release 2023-12-26 21:28:51 +01:00
Sheldan
da30a120d7 [maven-release-plugin] prepare for next development iteration 2023-12-25 01:29:54 +01:00
Sheldan
49875b2467 [maven-release-plugin] prepare release sissi-1.4.33 2023-12-25 01:29:50 +01:00
Sheldan
2236710086 [SIS-xxx] preparing for release 2023-12-25 01:24:36 +01:00
Sheldan
99b266e94a [SIS-xxx] updating abstracto version 2023-12-25 01:24:07 +01:00
Sheldan
974ab230ac [SIS-xxx] fixing orange sun doge command alternative not handling replies correctly 2023-12-24 01:08:34 +01:00
Sheldan
e5239f971c [maven-release-plugin] prepare for next development iteration 2023-12-23 23:43:04 +01:00
Sheldan
23db0b7c9e [maven-release-plugin] prepare release sissi-1.4.32 2023-12-23 23:43:01 +01:00
Sheldan
8167accd34 [SIS-xxx] preparing for release
updating more abstracto versions
2023-12-23 23:42:23 +01:00
Sheldan
375045f508 [SIS-xxx] updating abstracto version 2023-12-23 23:41:16 +01:00
Sheldan
3f4d5510d8 [maven-release-plugin] prepare for next development iteration 2023-12-23 22:35:20 +01:00
Sheldan
ba67f65bea [maven-release-plugin] prepare release sissi-1.4.31 2023-12-23 22:35:16 +01:00
Sheldan
1b7c2263ae [SIS-xxx] preparing for release 2023-12-23 22:34:53 +01:00
Sheldan
f065bf5244 [SIS-xxx] fixing docker compose file 2023-12-23 22:33:56 +01:00
Sheldan
e036fd0867 [maven-release-plugin] prepare for next development iteration 2023-12-23 22:21:45 +01:00
Sheldan
96960d77ac [maven-release-plugin] prepare release sissi-1.4.30 2023-12-23 22:21:41 +01:00
Sheldan
3894d4567e [SIS-xxx] preparing for release 2023-12-23 22:21:07 +01:00
Sheldan
503fd2520d [SIS-xxx] updating abstracto version
restructuring api to private and public rest api
adding custom image generation module
2023-12-23 22:20:18 +01:00
Sheldan
58d6b12a67 [SIS-xxx] refactoring to use a base image for rest api instead of a zipfile
changing image pull policy for rest api and bot to always
renaming rest api container
2023-12-20 21:07:59 +01:00
Sheldan
4128274a7d [SIS-xxx] refactoring rest api to use a common code base 2023-12-19 01:26:27 +01:00
Sheldan
3b498c5d3f [SIS-xxx] fixing abstracto deployment versions after upgrade 2023-12-12 21:29:39 +01:00
Sheldan
c6bdcaa84c [maven-release-plugin] prepare for next development iteration 2023-12-12 20:17:10 +01:00
Sheldan
90f3dd0ae9 [maven-release-plugin] prepare release sissi-1.4.29 2023-12-12 20:17:06 +01:00
Sheldan
cd482d640f [SIS-xxx] prepare for release 2023-12-12 20:16:06 +01:00
Sheldan
ae2f88daa3 [SIS-xxx] adding endless stream feature
updating abstracto version
2023-12-12 20:14:55 +01:00
Sheldan
c13f40fd3b [maven-release-plugin] prepare for next development iteration 2023-12-10 14:59:33 +01:00
Sheldan
37147a866f [maven-release-plugin] prepare release sissi-1.4.28 2023-12-10 14:59:29 +01:00
Sheldan
9a7d0613b1 [SIS-xxx] enabling giveaway module
updating to newer abstracto version
preparing for release
2023-12-10 14:58:19 +01:00
Sheldan
7e60447ae6 [maven-release-plugin] prepare for next development iteration 2023-12-01 23:39:45 +01:00
Sheldan
e4a899a125 [maven-release-plugin] prepare release sissi-1.4.27 2023-12-01 23:39:41 +01:00
Sheldan
ce8341e69a [SIS-xxx] changing caching
prepare for release
2023-12-01 23:38:38 +01:00
Sheldan
fa6333fa49 [maven-release-plugin] prepare for next development iteration 2023-12-01 23:16:02 +01:00
Sheldan
3393dea591 [maven-release-plugin] prepare release sissi-1.4.26 2023-12-01 23:15:57 +01:00
Sheldan
3c3bdfaed9 [SIS-xxx] preparing for release 2023-12-01 23:15:31 +01:00
Sheldan
172e3c4190 [SIS-xxx] adding uuid to clear cache 2023-12-01 23:14:57 +01:00
Sheldan
52b86804b9 [maven-release-plugin] prepare for next development iteration 2023-12-01 22:54:18 +01:00
Sheldan
de8d9982f3 [maven-release-plugin] prepare release sissi-1.4.25 2023-12-01 22:54:14 +01:00
Sheldan
29e1b22783 [SIS-xxx] preparing for release 2023-12-01 22:53:37 +01:00
Sheldan
5852d4837e [SIS-xxx] synchronizing the lookup for donations, so that simultaneous calls are not possible 2023-12-01 22:49:34 +01:00
Sheldan
b345fa5502 [SIS-xxx] fixing logging setup in case of a debra donation loading error 2023-11-30 21:02:16 +01:00
Sheldan
d6470e3714 [SIS-xxx] changing meetup time display to include week day name 2023-11-30 19:55:47 +01:00
Sheldan
b4cebe2b41 [maven-release-plugin] prepare for next development iteration 2023-11-29 21:08:14 +01:00
Sheldan
f3dd85d7d5 [maven-release-plugin] prepare release sissi-1.4.24 2023-11-29 21:08:10 +01:00
Sheldan
db318afb2b [SIS-xxx] preparing for release 2023-11-29 21:07:34 +01:00
Sheldan
ddd710d1c2 [SIS-xxx] changing wording of debra campaign info image 2023-11-29 21:05:02 +01:00
Sheldan
81824db1f1 [SIS-xxx] adding html wrapper for debra images
restructuring and splitting image generation into multiple files
adding doge sun image generation
2023-11-29 00:04:29 +01:00
Sheldan
0390d7c8ca [maven-release-plugin] prepare for next development iteration 2023-11-23 01:04:11 +01:00
Sheldan
61412f434c [maven-release-plugin] prepare release sissi-1.4.23 2023-11-23 01:04:07 +01:00
Sheldan
12e69a18fb [SIS-xxx] preparing for release 2023-11-23 01:02:35 +01:00
Sheldan
170ddd9c33 [SIS-xxx] fixing cache setup to add additional caches instead of overwriting the provided configuration 2023-11-23 01:01:40 +01:00
Sheldan
de8bbdcbee [SIS-xxx] fixing rest api image version 2023-11-21 00:39:07 +01:00
Sheldan
b5bf53fb6a [maven-release-plugin] prepare for next development iteration 2023-11-21 00:25:40 +01:00
Sheldan
159326dde3 [maven-release-plugin] prepare release sissi-1.4.22 2023-11-21 00:25:32 +01:00
Sheldan
7124d4e1d8 [SIS-xxx] prepare for release 2023-11-21 00:24:47 +01:00
Sheldan
c6f20d617d [SIS-xxx] adding rendering of current Debra donation information
updating for Debra 2023 campaign
adding internal rest api for debra information
adding a debra button to receive information
2023-11-21 00:23:03 +01:00
Sheldan
7449c05462 [maven-release-plugin] prepare for next development iteration 2023-11-14 23:41:52 +01:00
Sheldan
6bd0f0eaa2 [maven-release-plugin] prepare release sissi-1.4.21 2023-11-14 23:41:49 +01:00
Sheldan
9b8a3bcc1e [SIS-xxx] preparing for release 2023-11-14 23:40:38 +01:00
Sheldan
7b11a88256 [SIS-xxx] enabling external configuration of db pool size 2023-11-14 23:39:52 +01:00
Sheldan
30289e1166 [SIS-xxx] fixing template content 2023-11-01 09:20:14 +01:00
Sheldan
0bab3bbe69 [SIS-xxx] fixing template keys 2023-10-29 21:26:50 +01:00
Sheldan
6f75c76fc4 [maven-release-plugin] prepare for next development iteration 2023-10-29 19:16:26 +01:00
Sheldan
0d9aa4ae64 [maven-release-plugin] prepare release sissi-1.4.20 2023-10-29 19:16:22 +01:00
Sheldan
c6b0bf582b [SIS-xxx] bump version 2023-10-29 19:15:58 +01:00
Sheldan
dcd94ba5c0 [maven-release-plugin] prepare for next development iteration 2023-10-29 19:01:54 +01:00
Sheldan
98ae8ada8b [maven-release-plugin] prepare release sissi-1.4.19 2023-10-29 19:01:48 +01:00
Sheldan
96d3918a4d [SIS-25] adding rss news module
updating abstracto version
2023-10-29 19:00:16 +01:00
Sheldan
0d6f71baac [maven-release-plugin] prepare for next development iteration 2023-09-26 23:16:39 +02:00
Sheldan
d3421a6f95 [maven-release-plugin] prepare release sissi-1.4.18 2023-09-26 23:16:35 +02:00
Sheldan
0722bd6320 [SIS-xxx] preparing for release 2023-09-26 23:12:54 +02:00
Sheldan
a910870259 [SIS-xxx] removing discriminator and adapting join/leave text 2023-09-26 23:12:34 +02:00
Sheldan
18cc97600f [maven-release-plugin] prepare for next development iteration 2023-09-07 23:52:52 +02:00
Sheldan
a1ea57a0f3 [maven-release-plugin] prepare release sissi-1.4.17 2023-09-07 23:52:48 +02:00
Sheldan
23b554c93f [SIS-xxx] preparing for new release and upgrade of abstracto 2023-09-07 23:49:24 +02:00
Sheldan
5671c5019a [maven-release-plugin] prepare for next development iteration 2023-09-07 21:35:48 +02:00
Sheldan
fbb0876c7f [maven-release-plugin] prepare release sissi-1.4.16 2023-09-07 21:35:44 +02:00
Sheldan
bbaee9a47a [SIS-xxx] preparing for new release and upgrade of abstracto 2023-09-07 21:16:17 +02:00
Sheldan
b9f2a06173 [maven-release-plugin] prepare for next development iteration 2023-09-03 14:05:45 +02:00
Sheldan
55ba69bb0f [maven-release-plugin] prepare release sissi-1.4.15 2023-09-03 14:05:42 +02:00
Sheldan
9ed71b8660 [SIS-xxx] preparing for new release and upgrade of abstracto 2023-09-03 14:04:54 +02:00
Sheldan
28cf141a02 [maven-release-plugin] prepare for next development iteration 2023-09-03 01:18:54 +02:00
Sheldan
03ca4d128d [maven-release-plugin] prepare release sissi-1.4.14 2023-09-03 01:18:47 +02:00
Sheldan
ff2029819d [SIS-xxx] preparing for new release 2023-09-03 01:15:18 +02:00
Sheldan
a26503650e [SIS-24] adding ability to only search quotes of a given parameter for a text
changing quote search to return a random matching quote
adding local function to tilt to update packages
2023-09-03 00:48:15 +02:00
Sheldan
7a37f7e040 [SIS-xxx] fixing tilt file caching
updating dashboards to filter for namespace
upgrading to new abstracto version -snapshot
2023-09-02 21:28:13 +02:00
Sheldan
0073d5b069 [maven-release-plugin] prepare for next development iteration 2023-08-30 01:23:11 +02:00
Sheldan
c210e34437 [maven-release-plugin] prepare release sissi-1.4.13 2023-08-30 01:23:06 +02:00
Sheldan
7a43b23d68 [SIS-xxx] fixing single core jdk 17 issue
preparing for new version
2023-08-30 01:22:28 +02:00
Sheldan
7c15648e75 [maven-release-plugin] prepare for next development iteration 2023-08-30 01:08:06 +02:00
Sheldan
d629bf633f [maven-release-plugin] prepare release sissi-1.4.12 2023-08-30 01:08:02 +02:00
Sheldan
4115037141 [SIS-xxx] prepare for release 2023-08-30 01:07:38 +02:00
Sheldan
5d02bb99d4 [SIS-xxx] corrected hook weight for db credentials 2023-08-30 01:07:08 +02:00
Sheldan
96bdc3d089 [maven-release-plugin] prepare for next development iteration 2023-08-30 00:50:04 +02:00
Sheldan
71546fcc89 [maven-release-plugin] prepare release sissi-1.4.11 2023-08-30 00:50:00 +02:00
Sheldan
22c330c7e4 [SIS-xxx] reducing hook weight for db credentials 2023-08-30 00:49:24 +02:00
Sheldan
fd402a966a [SIS-xxx] changing db secrets to be created before installation 2023-08-30 00:49:03 +02:00
Sheldan
b3029deea4 [maven-release-plugin] prepare for next development iteration 2023-08-30 00:34:50 +02:00
Sheldan
24b23c445f [maven-release-plugin] prepare release sissi-1.4.10 2023-08-30 00:34:46 +02:00
Sheldan
a9c44e24f1 prepare for release 2023-08-30 00:34:22 +02:00
Sheldan
7deee4008d correct config deployment job helm hooks 2023-08-30 00:33:37 +02:00
Sheldan
2ab922cc84 [maven-release-plugin] prepare for next development iteration 2023-08-30 00:12:31 +02:00
Sheldan
c6a7b60e41 [maven-release-plugin] prepare release sissi-1.4.9 2023-08-30 00:12:27 +02:00
Sheldan
49974648b6 making probes configurable 2023-08-30 00:11:48 +02:00
Sheldan
cd7580f45d [maven-release-plugin] prepare for next development iteration 2023-08-29 23:55:21 +02:00
Sheldan
076afb35b4 [maven-release-plugin] prepare release sissi-1.4.8 2023-08-29 23:55:17 +02:00
Sheldan
f901aeaefc [SIS-xxx] renaming sissi run image 2023-08-29 23:54:47 +02:00
Sheldan
6b37de3db5 [maven-release-plugin] prepare for next development iteration 2023-08-29 23:26:28 +02:00
Sheldan
0b80e351a5 [maven-release-plugin] prepare release sissi-1.4.7 2023-08-29 23:26:24 +02:00
Sheldan
3fe47ab682 [SIS-xxx] prepare for release 2023-08-29 23:25:56 +02:00
Sheldan
9b69fe5f2d [SIS-xxx] removing grafana credentials secret from helm chart 2023-08-29 23:25:03 +02:00
Sheldan
953eb1b4ff [maven-release-plugin] prepare for next development iteration 2023-08-28 00:06:52 +02:00
Sheldan
876dd82d87 [maven-release-plugin] prepare release sissi-1.4.6 2023-08-28 00:06:34 +02:00
Sheldan
454d66c71e [SIS-xxx] changing repository for bot deployment in k8s 2023-08-28 00:05:59 +02:00
Sheldan
87f72a077d [maven-release-plugin] prepare for next development iteration 2023-08-27 23:56:33 +02:00
Sheldan
62c27d1461 [maven-release-plugin] prepare release sissi-1.4.5 2023-08-27 23:56:29 +02:00
Sheldan
3b2bbb1dce [SIS-xxx] preparing for 1.4.5 release 2023-08-27 23:55:36 +02:00
Sheldan
8f40a95cbe [maven-release-plugin] prepare for next development iteration 2023-08-27 23:48:06 +02:00
Sheldan
5e9518de71 [maven-release-plugin] prepare release sissi-1.4.4 2023-08-27 23:48:02 +02:00
Sheldan
0ecab3b21b [SIS-xxx] preparing for 1.4.4 release 2023-08-27 23:42:57 +02:00
Sheldan
5e0e546eb4 [maven-release-plugin] prepare for next development iteration 2023-08-27 23:32:57 +02:00
Sheldan
ade0d4e57d [maven-release-plugin] prepare release sissi-1.4.3 2023-08-27 23:32:53 +02:00
Sheldan
26b08c593c [SIS-xxx] preparing for 1.4.2 release 2023-08-27 23:32:25 +02:00
Sheldan
888f2bd402 [SIS-xxx] fixing env file loading 2023-08-27 23:31:12 +02:00
Sheldan
eb369d9116 [maven-release-plugin] prepare for next development iteration 2023-08-27 23:17:25 +02:00
Sheldan
f2acdbdd81 [maven-release-plugin] prepare release sissi-1.4.2 2023-08-27 23:17:21 +02:00
Sheldan
d65f6d380f [SIS-xxx] introducing helm chart
restructuring
2023-08-27 23:12:01 +02:00
Sheldan
30d45952be [maven-release-plugin] prepare for next development iteration 2023-07-22 18:29:23 +02:00
Sheldan
068cbdb33c [maven-release-plugin] prepare release sissi-1.4.1 2023-07-22 18:29:19 +02:00
Sheldan
effca93b7a [SIS-xxx] upgrading to abstracto 1.5.1 2023-07-22 18:26:51 +02:00
Sheldan
ac815b5972 [SIS-22] fixing always url encoding the location for meetups 2023-07-10 01:31:21 +02:00
Sheldan
e6cccef48d [SIS-21] fixing meetup title not being escaped in meetup list response 2023-07-10 01:07:21 +02:00
Sheldan
4f35aa56f4 [maven-release-plugin] prepare for next development iteration 2023-07-09 23:44:53 +02:00
Sheldan
66204ca061 [maven-release-plugin] prepare release sissi-1.4.0 2023-07-09 23:44:49 +02:00
Sheldan
2960173517 [SIS-xxx] prepare for release
upgrading to java 17
upgrading to abstracto 1.5.0
2023-07-09 23:37:49 +02:00
Sheldan
b810c25613 [maven-release-plugin] prepare for next development iteration 2023-06-04 21:41:53 +02:00
Sheldan
583c2cc4be [maven-release-plugin] prepare release sissi-1.3.29 2023-06-04 21:41:49 +02:00
Sheldan
0c36564331 [SIS-xxx] prepare for release 2023-06-04 21:14:24 +02:00
Sheldan
d7bd458bed [SIS-xxx] limiting shown meetups to the ones created in the channel 2023-05-23 01:11:45 +02:00
Sheldan
bbcd77e3c8 [maven-release-plugin] prepare for next development iteration 2023-05-19 00:47:13 +02:00
Sheldan
ec166167f4 [maven-release-plugin] prepare release sissi-1.3.28 2023-05-19 00:47:09 +02:00
Sheldan
d5b4835d1f [SIS-xxx] preparing for release 2023-05-19 00:43:40 +02:00
Sheldan
41304551e4 [SIS-xxx] preparing for release 2023-05-19 00:25:39 +02:00
Sheldan
279959f256 [maven-release-plugin] prepare for next development iteration 2023-05-19 00:06:57 +02:00
Sheldan
7cc0e8e21c [maven-release-plugin] prepare release sissi-1.3.27 2023-05-19 00:06:53 +02:00
Sheldan
87e9122c41 [SIS-xxx] preparing for release 2023-05-19 00:06:18 +02:00
Sheldan
f22cc03e14 [maven-release-plugin] prepare for next development iteration 2023-05-18 23:22:59 +02:00
Sheldan
84b103cfba [maven-release-plugin] prepare release sissi-1.3.26 2023-05-18 23:22:54 +02:00
Sheldan
a015e01c40 [SIS-xxx] preparing for release 2023-05-18 23:22:21 +02:00
Sheldan
981db7b43f [SIS-20] adding feature to attach an ics file to meetups
can be toggled via feature mode
2023-05-18 22:49:50 +02:00
Sheldan
65560991bc [maven-release-plugin] prepare for next development iteration 2023-03-29 23:24:32 +02:00
Sheldan
b914ba035f [maven-release-plugin] prepare release sissi-1.3.25 2023-03-29 23:24:27 +02:00
Sheldan
d3e77f17ec [SIS-xxx] preparing for release 2023-03-29 23:23:09 +02:00
Sheldan
9498458165 [SIS-xxx] enabling emote usage tracking 2023-03-29 23:22:45 +02:00
Sheldan
03a112fb43 [SIS-xxx] update license 2023-03-20 23:18:11 +01:00
Sheldan
782773fef5 [SIS-xxx] fixed missing parameter for bot service in docker compose 2023-03-19 10:33:43 +01:00
Sheldan
5076e79c1d [maven-release-plugin] prepare for next development iteration 2023-03-19 00:39:42 +01:00
Sheldan
ac1baa4734 [maven-release-plugin] prepare release sissi-1.3.24 2023-03-19 00:39:39 +01:00
Sheldan
2c508665be [SIS-xxx] preparing for release 2023-03-19 00:13:48 +01:00
Sheldan
1023951a76 [maven-release-plugin] prepare for next development iteration 2023-02-26 11:23:30 +01:00
Sheldan
a1923427a0 [maven-release-plugin] prepare release sissi-1.3.23 2023-02-26 11:23:26 +01:00
Sheldan
4c8ca91712 [SIS-xxx] preparing for release 2023-02-26 11:03:00 +01:00
Sheldan
f78ab3372e [SIS-17] fixing meetup failing to create if no location is provided 2023-02-22 16:16:08 +01:00
Sheldan
c70815f25d [SIS-xxx] changing lvl up notification message 2023-02-20 11:44:04 +01:00
Sheldan
7ee3653ab9 [maven-release-plugin] prepare for next development iteration 2023-02-15 00:39:16 +01:00
412 changed files with 7998 additions and 9745 deletions

4
.env Normal file
View File

@@ -0,0 +1,4 @@
REGISTRY_PREFIX=harbor.sheldan.dev/sissi/
ABSTRACTO_PREFIX=harbor.sheldan.dev/abstracto/
VERSION=1.4.44
ABSTRACTO_VERSION=1.5.26

View File

@@ -17,11 +17,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- uses: actions/checkout@v3
with:
java-version: 1.8
persist-credentials: false
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 17
- name: Build with Maven
run: mvn -s settings.xml -B install --file pom.xml
env:

View File

@@ -1,38 +0,0 @@
name: Publish package to GitHub Packages
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Java for publishing to GitHub Packages
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Load current version
id: version
run: echo "version=$(mvn -s settings.xml --file pom.xml -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
- name: Publish to GitHub Packages
run: mvn -s settings.xml --file pom.xml -B deploy -Dmaven.wagon.http.pool=false -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
user: Sheldan
token: ${{ secrets.ABSTRACTO_PAT }}
- name: Login to GitHub Packages Docker Registry
uses: docker/login-action@v1
with:
registry: docker.pkg.github.com
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push deployment container
working-directory: ./deployment/image-packaging/src/main/docker
run: docker-compose build && docker-compose push
env:
REGISTRY_PREFIX: docker.pkg.github.com/sheldan/sissi/
VERSION: ${{ env.version }}
ABSTRACTO_VERSION: 1.4.20
ABSTRACTO_REGISTRY_PREFIX: docker.pkg.github.com/sheldan/abstracto/

92
.github/workflows/release_manual.yaml vendored Normal file
View File

@@ -0,0 +1,92 @@
name: Publishes a new version of Sissi
on: workflow_dispatch
permissions:
packages: write
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 17
- name: Load current version
id: version
run: echo "version=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec | cut -d- -f1)" >> $GITHUB_ENV
- name: Create a Release
uses: elgohr/Github-Release-Action@v5
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: Release of version ${{ env.version }}
- name: Release maven packages
uses: qcastel/github-actions-maven-release@v1.12.41
env:
JAVA_HOME: /usr/lib/jvm/java-17-openjdk/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
abstractoUser: Sheldan
abstractoToken: ${{ secrets.ABSTRACTO_PAT }}
with:
git-release-bot-name: "release-bot"
git-release-bot-email: "release-bot@sheldan.dev"
release-branch-name: master
maven-args: "-Dmaven.javadoc.skip=true -s settings.xml -DskipTests"
access-token: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Harbor
uses: docker/login-action@v2
with:
registry: harbor.sheldan.dev
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_TOKEN }}
- name: Update Chart version file
uses: fjogeleit/yaml-update-action@v0.13.2
with:
valueFile: 'deployment/helm/sissi/Chart.yaml'
propertyPath: 'version'
value: ${{ env.version }}
commitChange: false
- name: Update value files version
uses: fjogeleit/yaml-update-action@v0.13.2
with:
valueFile: 'deployment/helm/sissi/values.yaml'
commitChange: false
changes: |
{
"bot.tag": "${{ env.version }}",
"restApi.tag": "${{ env.version }}",
"privateRestApi.tag": "${{ env.version }}",
"templateDeploymentData.tag": "${{ env.version }}",
"dbConfigDeploymentData.tag": "${{ env.version }}"
}
- name: Update .env version
run:
sed -i '3s/.*/VERSION=${{ env.version }}/' .env
- name: Load env file
id: dotenv
uses: falti/dotenv-action@v1.0.4
with:
path: .env
- name: Build and push Docker containers
run: docker-compose build && docker-compose push
env:
REGISTRY_PREFIX: ${{ steps.dotenv.outputs.registry_prefix }}
VERSION: ${{ steps.dotenv.outputs.version }}
- name: Helm package and push
working-directory: ./deployment/helm/
run: |-
helm registry login -u '${{ secrets.HARBOR_USERNAME }}' -p '${{ secrets.HARBOR_TOKEN }}' harbor.sheldan.dev
helm package sissi
helm push sissi*.tgz oci://harbor.sheldan.dev/sissi
- name: Fix file permissions
run:
sudo chmod -R ugo+rwX . # https://github.com/actions/checkout/issues/164
- name: Commit updated versions
uses: EndBug/add-and-commit@v9
with:
author_name: "release-bot"
author_email: "release-bot@sheldan.dev"

4
.gitignore vendored
View File

@@ -21,5 +21,9 @@ target/
*.tar.gz
*.rar
Chart.lock
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
*.tgz

3
.tiltignore Normal file
View File

@@ -0,0 +1,3 @@
*.tgz
tilt/sissi-dev/tmpcharts/
tilt/sissi-dev/charts/*.tgz

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2022 Sheldan
Copyright (c) 2023 Sheldan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

48
Tiltfile Normal file
View File

@@ -0,0 +1,48 @@
allow_k8s_contexts('k8s-cluster')
load('ext://restart_process', 'docker_build_with_restart')
registry = 'harbor.sheldan.dev/sissi/'
abstracto_registry = 'harbor.sheldan.dev/abstracto/'
local_resource(
'sissi-java-compile',
' mvn install && ' +
' rm -rf application/executable/target/jar-staging && ' +
' unzip -o application/executable/target/sissi-exec.jar -d application/executable/target/jar-staging && ' +
' rsync --delete --delete-excluded --inplace --checksum --exclude="*-SNAPSHOT.jar" -r application/executable/target/jar-staging/ application/executable/target/jar && ' +
' rm -rf application/executable/target/jar/snapshots && ' +
' mkdir application/executable/target/jar/snapshots && ' +
' rsync --delete --delete-excluded --inplace --checksum --include="*/" --include="*-SNAPSHOT.jar" --exclude="*" -r application/executable/target/jar-staging/BOOT-INF/lib/ application/executable/target/jar/snapshots',
deps=['pom.xml'], auto_init=False, trigger_mode = TRIGGER_MODE_MANUAL)
docker_build_with_restart(
registry + 'sissi-bot',
'./application/executable/target/jar',
entrypoint=['java', '-noverify', '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005', '-cp', '.:./lib/*', 'dev.sheldan.sissi.executable.Application'],
dockerfile='./application/executable/Dockerfile',
live_update=[
sync('./application/executable/target/jar/BOOT-INF/lib', '/app/lib'),
sync('./application/executable/target/jar/META-INF', '/app/META-INF'),
sync('./application/executable/target/jar/BOOT-INF/classes', '/app'),
sync('./application/executable/target/jar/snapshots', '/app/lib')
],
)
docker_build(registry + 'sissi-db-data', 'deployment/image-packaging/src/main/docker/db-data/')
docker_build(registry + 'sissi-debra-rest-api', 'python/modules/debra-rest-api/', dockerfile='python/modules/debra-rest-api/docker/Dockerfile')
update_settings(suppress_unused_image_warnings=[registry + "sissi-debra-rest-api"]) # only used in docker image building
docker_build(registry + 'sissi-image-gen-api', 'python/modules/image-gen-api/', dockerfile='python/modules/image-gen-api/docker/Dockerfile')
update_settings(suppress_unused_image_warnings=[registry + "sissi-image-gen-api"]) # only used in docker image building
docker_build(registry + 'sissi-rest-api', 'deployment/image-packaging/src/main/docker/rest-api/', build_args={'REGISTRY_PREFIX': abstracto_registry, 'SISSI_REGISTRY_PREFIX': registry})
docker_build(registry + 'sissi-private-rest-api', 'deployment/image-packaging/src/main/docker/private-rest-api/', build_args={'REGISTRY_PREFIX': abstracto_registry, 'SISSI_REGISTRY_PREFIX': registry})
docker_build(registry + 'sissi-template-data', 'deployment/image-packaging/src/main/docker/template-data/')
local('cd tilt/sissi-dev && helm dep up')
k8s_yaml(helm('tilt/sissi-dev', values=
['./../Sissi-environments/argocd/apps/sissi/values/local/values.yaml',
'secrets://./../Sissi-environments/argocd/apps/sissi/values/local/values.secrets.yaml']
))
local_resource('fetch-packages', 'mvn install -f deployment/image-packaging/pom.xml', auto_init=False, trigger_mode = TRIGGER_MODE_MANUAL)
k8s_resource('chart-sissi', port_forwards='5005:5005')

View File

@@ -0,0 +1,10 @@
FROM amazoncorretto:17.0.8-alpine3.18
RUN apk add entr
WORKDIR /app
ADD BOOT-INF/lib/ /app/lib
ADD snapshots/ /app/lib
ADD META-INF /app/META-INF
ADD BOOT-INF/classes /app
ENTRYPOINT java -cp .:./lib/* dev.sheldan.sissi.executable.Application

View File

@@ -3,17 +3,13 @@
<parent>
<groupId>dev.sheldan.sissi.application</groupId>
<artifactId>application</artifactId>
<version>1.3.22</version>
<version>1.4.45</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>executable</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<build>
<finalName>sissi</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
@@ -75,6 +71,11 @@
<artifactId>webservices-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>twitch-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>utility-impl</artifactId>
@@ -130,6 +131,26 @@
<artifactId>logging-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>statistic-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>sticky-roles-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>giveaway-impl</artifactId>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>image-generation-impl</artifactId>
</dependency>
<!-- sissi modules -->
<dependency>
@@ -144,6 +165,12 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>dev.sheldan.sissi.application.module</groupId>
<artifactId>rss-news</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>dev.sheldan.sissi.application.module</groupId>
<artifactId>debra</artifactId>
@@ -158,6 +185,12 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
<artifactId>image-generation-custom</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,18 @@
package dev.sheldan.sissi.executable;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.SecurityFilterChain;
@Configuration
public class SecurityConfig {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.authorizeHttpRequests((authorize) -> authorize
.anyRequest().permitAll());
return http.build();
}
}

View File

@@ -1,21 +0,0 @@
spring.datasource.url=jdbc:postgresql://localhost:5432/abstracto
spring.datasource.username=abstracto
spring.datasource.password=abstracto
spring.jpa.properties.hibernate.default_schema=abstracto
spring.quartz.jdbc.initialize-schema=never
spring.jpa.hibernate.ddl-auto = none
spring.jpa.show-sql = false
spring.jpa.properties.hibernate.format_sql = true
log4j.logger.org.hibernate.SQL=trace
log4j.logger.org.hibernate.type.descriptor.sql=trace
log4j.logger.org.hibernate.type=trace
management.metrics.tags.application=sissi
spring.security.user.name=abstracto
spring.security.user.password=password
spring.security.user.roles=USER
spring.application.name=Sissi

View File

@@ -1,11 +1,14 @@
spring.datasource.url=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}
spring.datasource.username= ${DB_USER}
spring.datasource.password= ${DB_PASS}
spring.jpa.hibernate.default_schema=${DB_NAME}
spring.datasource.hikari.maximum-pool-size=${hikariPoolSize}
spring.jpa.hibernate.default_schema=${DB_SCHEMA}
spring.jpa.properties.hibernate.default_schema=${DB_SCHEMA}
spring.quartz.jdbc.initialize-schema=never
management.metrics.tags.application=Sissi
spring.security.user.name= ${REST_USER_NAME}
spring.security.user.password= ${REST_PASSWORD}
spring.security.user.roles=USER
management.endpoint.health.probes.enabled=true
management.health.livenessState.enabled=true
management.health.readinessState.enabled=true
spring.application.name=Sissi
spring.application.name=Sissi
spring.main.allow-circular-references=true

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId>
<version>1.3.22</version>
<version>1.4.45</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -22,6 +22,18 @@
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena-libs</artifactId>
<version>${apache-jena.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.apptasticsoftware</groupId>
<artifactId>rssreader</artifactId>
<version>${rssreader.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
<artifactId>sissi-customizations</artifactId>
<version>1.4.45</version>
</parent>
<artifactId>image-generation-custom</artifactId>
<dependencies>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>image-generation-int</artifactId>
<version>${abstracto.version}</version>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.core</groupId>
<artifactId>core-int</artifactId>
<version>${abstracto.version}</version>
</dependency>
</dependencies>
</project>

View File

@@ -1,19 +1,18 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
<id>docker-compose</id>
<id>liquibase</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<outputDirectory>./docker-compose</outputDirectory>
<directory>${project.basedir}/src/main/resources/</directory>
<outputDirectory>.</outputDirectory>
<directory>${project.basedir}/src/main/resources/migrations</directory>
<includes>
<include>**/*</include>
</includes>
<filtered>true</filtered>
</fileSet>
</fileSets>
</assembly>

View File

@@ -0,0 +1,80 @@
package dev.sheldan.sissi.module.custom.imagegeneration.command;
import dev.sheldan.abstracto.core.command.CommandAlternative;
import dev.sheldan.abstracto.core.command.execution.UnParsedCommandParameter;
import dev.sheldan.abstracto.core.command.service.CommandRegistry;
import dev.sheldan.abstracto.core.config.ListenerPriority;
import dev.sheldan.abstracto.core.service.ChannelService;
import dev.sheldan.abstracto.core.service.FeatureFlagService;
import dev.sheldan.abstracto.core.templating.model.AttachedFile;
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.templating.service.TemplateService;
import dev.sheldan.abstracto.core.utils.FileService;
import dev.sheldan.abstracto.core.utils.FutureUtils;
import dev.sheldan.abstracto.imagegeneration.config.ImageGenerationFeatureConfig;
import dev.sheldan.sissi.module.custom.imagegeneration.service.ImageGenerationService;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.io.File;
import java.util.Arrays;
import java.util.List;
@Component
public class OrangeSunDogeCommandAlternative implements CommandAlternative {
@Autowired
private ImageGenerationService imageGenerationService;
@Autowired
private TemplateService templateService;
@Autowired
private ChannelService channelService;
@Autowired
private FileService fileService;
@Autowired
private CommandRegistry commandRegistry;
@Autowired
private FeatureFlagService featureFlagService;
@Autowired
private ImageGenerationFeatureConfig imageGenerationFeatureConfig;
private static final String DOGE_ORANGE_SUN_RESPONSE_TEMPLATE_KEY = "doge_orangeSun_response";
@Override
public boolean shouldExecute(UnParsedCommandParameter parameter, Guild guild, Message message) {
String contentStripped = message.getContentRaw();
String[] parameters = contentStripped.split(" ");
return parameters.length == 1 && featureFlagService.isFeatureEnabled(imageGenerationFeatureConfig, guild.getIdLong());
}
@Override
public void execute(UnParsedCommandParameter parameter, Message message) {
String contentStripped = message.getContentRaw();
List<String> parameters = Arrays.asList(contentStripped.split(" "));
String inputText = commandRegistry.getCommandName(parameters.get(0), message.getGuild().getIdLong());
File triggeredGifFile = imageGenerationService.getOrangeSunDogeImage(inputText);
MessageToSend messageToSend = templateService.renderEmbedTemplate(DOGE_ORANGE_SUN_RESPONSE_TEMPLATE_KEY, new Object());
// template support does not support binary files
AttachedFile file = AttachedFile
.builder()
.file(triggeredGifFile)
.fileName("doge.png")
.build();
messageToSend.getAttachedFiles().add(file);
FutureUtils.toSingleFutureGeneric(channelService.sendMessageToSendToChannel(messageToSend, message.getGuildChannel()))
.thenAccept(unused -> fileService.safeDeleteIgnoreException(messageToSend.getAttachedFiles().get(0).getFile()));
}
@Override
public Integer getPriority() {
return ListenerPriority.LOW;
}
}

View File

@@ -0,0 +1,10 @@
package dev.sheldan.sissi.module.custom.imagegeneration.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
@Configuration
@PropertySource("classpath:custom-image-generation-config.properties")
public class CustomImageGenerationConfig {
}

View File

@@ -0,0 +1,29 @@
package dev.sheldan.sissi.module.custom.imagegeneration.service;
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
import dev.sheldan.abstracto.core.service.HttpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.io.File;
import java.io.IOException;
@Component
public class ImageGenerationService {
@Value("${abstracto.feature.imagegeneration.doge.orangeSun.url}")
private String dogeOrangeSunUrl;
@Autowired
private HttpService httpService;
public File getOrangeSunDogeImage(String inputText) {
try {
return httpService.downloadFileToTempFile(dogeOrangeSunUrl.replace("{1}", inputText));
} catch (IOException e) {
throw new AbstractoRunTimeException(String.format("Failed to download orange doge image for url %s with error %s", inputText, e.getMessage()));
}
}
}

View File

@@ -0,0 +1 @@
abstracto.feature.imagegeneration.doge.orangeSun.url=http://${PRIVATE_REST_API_HOST}:${PRIVATE_REST_API_PORT}/memes/doge/orangeSun/?text={1}

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
<artifactId>sissi-customizations</artifactId>
<version>1.3.22</version>
<version>1.4.45</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -1,10 +1,6 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="seedData/data.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="feature.xml" relativeToChangelogFile="true"/>
<include file="default_emote.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<changeSet author="Sheldan" id="moderation_custom_reaction_message_default_emote-insert">
<insert tableName="default_emote">
<column name="emote_key" value="reactionReport1"/>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<changeSet author="Sheldan" id="moderation_custom_feature-insertion">
<insert tableName="feature">
<column name="key" value="moderationCustom"/>

View File

@@ -1,10 +1,6 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="seedData/data.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<property name="moderationCustomFeature" value="(SELECT id FROM feature WHERE key = 'moderationCustom')"/>
<property name="moderationModule" value="(SELECT id FROM module WHERE name = 'moderation')"/>
<changeSet author="Sheldan" id="moderationCustom_modmode-commands">

View File

@@ -1,10 +1,6 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="command.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="1.1.0/collection.xml" relativeToChangelogFile="true"/>
<include file="1.2.1/collection.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>application</artifactId>
<groupId>dev.sheldan.sissi.application</groupId>
<version>1.3.22</version>
<version>1.4.45</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -13,6 +13,7 @@
<modules>
<module>moderation-custom</module>
<module>image-generation-custom</module>
</modules>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application</groupId>
<artifactId>sissi-modules</artifactId>
<version>1.3.22</version>
<version>1.4.45</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -15,6 +15,19 @@
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
<classifier>jakarta</classifier>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
</dependencies>
<build>

View File

@@ -0,0 +1,69 @@
package dev.sheldan.sissi.module.debra.api;
import dev.sheldan.sissi.module.debra.model.api.*;
import dev.sheldan.sissi.module.debra.service.DonationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import static dev.sheldan.sissi.module.debra.config.DebraFeatureConfig.DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME;
@RestController
@RequestMapping(value = "/debra")
public class DebraDonationStatusController {
@Autowired
private DonationService donationService;
@GetMapping(value = "/latestDonations", produces = "application/json")
public DonationStats getLatestDonations() {
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
DonationsResponse donationResponse = donationService.getSynchronizedCachedDonationAmount(serverId);
List<DonationInfo> donations = donationService.getLatestDonations(donationResponse, Integer.MAX_VALUE)
.stream()
.map(DonationInfo::fromDonationItemModel)
.toList();
return DonationStats
.builder()
.totalAmount(donationResponse.getPage().getCollected())
.donations(donations)
.build();
}
@GetMapping(value = "/highestDonations", produces = "application/json")
public DonationStats getHighestDonations() {
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
DonationsResponse donationResponse = donationService.getSynchronizedCachedDonationAmount(serverId);
List<DonationInfo> donations = donationService.getHighestDonations(donationResponse, Integer.MAX_VALUE)
.stream()
.map(DonationInfo::fromDonationItemModel)
.toList();
return DonationStats
.builder()
.totalAmount(donationResponse.getPage().getCollected())
.donations(donations)
.build();
}
@GetMapping(value = "/campaignInfo", produces = "application/json")
public CampaignInfo getCampaignInfo() {
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
DonationsResponse donationResponse = donationService.getSynchronizedCachedDonationAmount(serverId);
Description pageObject = donationResponse.getPage();
return CampaignInfo
.builder()
.collected(pageObject.getCollected())
.collectedNet(pageObject.getCollectedNet())
.donationCount(donationResponse.getDonationCount())
.currency(pageObject.getCurrency())
.percent(pageObject.getPercent())
.displayName(pageObject.getDisplayName())
.slug(pageObject.getSlug())
.target(pageObject.getTarget())
.build();
}
}

View File

@@ -0,0 +1,51 @@
package dev.sheldan.sissi.module.debra.api;
import dev.sheldan.abstracto.core.service.ConfigService;
import dev.sheldan.sissi.module.debra.config.DebraFeatureConfig;
import dev.sheldan.sissi.module.debra.model.api.DonationsResponse;
import dev.sheldan.sissi.module.debra.model.api.EndlessStreamInfo;
import dev.sheldan.sissi.module.debra.model.database.EndlessStream;
import dev.sheldan.sissi.module.debra.service.DonationService;
import dev.sheldan.sissi.module.debra.service.management.EndlessStreamManagementServiceBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import static dev.sheldan.sissi.module.debra.config.DebraFeatureConfig.DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME;
@RestController
@RequestMapping(value = "/stream")
public class EndlessStreamController {
@Autowired
private EndlessStreamManagementServiceBean endlessStreamManagementServiceBean;
@Autowired
private DonationService donationService;
@Autowired
private ConfigService configService;
@GetMapping(value = "/endlessStream/{id}", produces = "application/json")
public EndlessStreamInfo getLatestDonations(@PathVariable("id") Long id) {
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
EndlessStream endlessStream = endlessStreamManagementServiceBean.getEndlessStream(id);
DonationsResponse donationInfo = donationService.getSynchronizedCachedDonationAmount(serverId);
BigDecimal collectedAmount = donationInfo.getPage().getCollected();
Long minuteRate = configService.getLongValueOrConfigDefault(DebraFeatureConfig.ENDLESS_STREAM_MINUTE_RATE, serverId);
Instant endDate = endlessStream.getStartTime().plus(collectedAmount.multiply(new BigDecimal(minuteRate)).toBigInteger().longValue(), ChronoUnit.MINUTES);
return EndlessStreamInfo
.builder()
.startDate(endlessStream.getStartTime())
.endDate(endDate)
.donationAmount(collectedAmount.longValue())
.minuteRate(minuteRate)
.build();
}
}

View File

@@ -0,0 +1,91 @@
package dev.sheldan.sissi.module.debra.commands;
import dev.sheldan.abstracto.core.command.UtilityModuleDefinition;
import dev.sheldan.abstracto.core.command.condition.AbstractConditionableCommand;
import dev.sheldan.abstracto.core.command.config.CommandConfiguration;
import dev.sheldan.abstracto.core.command.config.HelpInfo;
import dev.sheldan.abstracto.core.command.config.Parameter;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.InteractionService;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
import dev.sheldan.sissi.module.debra.config.DebraFeatureDefinition;
import dev.sheldan.sissi.module.debra.config.DebraSlashCommandNames;
import dev.sheldan.sissi.module.debra.service.DonationService;
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CompletableFuture;
@Component
public class DebraInfoButton extends AbstractConditionableCommand {
private static final String DEBRA_INFO_BUTTON = "debraInfoButton";
private static final String DEBRA_INFO_BUTTON_RESPONSE_TEMPLATE_KEY = "debraInfoButton_response";
private static final String TARGET_CHANNEL_PARAMETER_KEY = "targetChannel";
@Autowired
private SlashCommandParameterService slashCommandParameterService;
@Autowired
private InteractionService interactionService;
@Autowired
private DonationService donationService;
@Override
public CompletableFuture<CommandResult> executeSlash(SlashCommandInteractionEvent event) {
GuildMessageChannel targetChannel = slashCommandParameterService.getCommandOption(TARGET_CHANNEL_PARAMETER_KEY, event, GuildMessageChannel.class);
return donationService.sendDebraInfoButtonMessage(targetChannel)
.thenCompose(unused -> interactionService.replyEmbed(DEBRA_INFO_BUTTON_RESPONSE_TEMPLATE_KEY, event))
.thenApply(interactionHook -> CommandResult.fromSuccess());
}
@Override
public CommandConfiguration getConfiguration() {
HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
SlashCommandConfig slashCommandConfig = SlashCommandConfig
.builder()
.enabled(true)
.rootCommandName(DebraSlashCommandNames.DEBRA_INTERNAL)
.commandName("debrainfobutton")
.build();
Parameter targetChannelParameter = Parameter
.builder()
.templated(true)
.name(TARGET_CHANNEL_PARAMETER_KEY)
.type(GuildMessageChannel.class)
.build();
List<Parameter> parameters = Arrays.asList(targetChannelParameter);
return CommandConfiguration.builder()
.name(DEBRA_INFO_BUTTON)
.module(UtilityModuleDefinition.UTILITY)
.templated(true)
.slashCommandConfig(slashCommandConfig)
.async(true)
.slashCommandOnly(true)
.parameters(parameters)
.supportsEmbedException(true)
.causesReaction(false)
.help(helpInfo)
.build();
}
@Override
public FeatureDefinition getFeature() {
return DebraFeatureDefinition.DEBRA;
}
}

View File

@@ -113,20 +113,16 @@ public class Donations extends AbstractConditionableCommand {
private MessageToSend getDonationMessageToSend(Long serverId, Integer top, Integer latest) {
DonationsModel donationModel;
try {
DonationsResponse donationResponse = donationService.fetchCurrentDonationAmount(serverId);
donationModel = donationConverter.convertDonationResponse(donationResponse);
if(top != null) {
donationModel.setDonations(donationService.getHighestDonations(donationResponse, top));
donationModel.setType(DonationsModel.DonationType.TOP);
} else if(latest != null) {
donationModel.setType(DonationsModel.DonationType.LATEST);
donationModel.setDonations(donationService.getLatestDonations(donationResponse, latest));
} else {
donationModel.setDonations(new ArrayList<>());
}
} catch (IOException e) {
throw new AbstractoRunTimeException("Failed to load donation amount.", e);
DonationsResponse donationResponse = donationService.fetchCurrentDonationAmount(serverId);
donationModel = donationConverter.convertDonationResponse(donationResponse);
if(top != null) {
donationModel.setDonations(donationService.getHighestDonations(donationResponse, top));
donationModel.setType(DonationsModel.DonationType.TOP);
} else if(latest != null) {
donationModel.setType(DonationsModel.DonationType.LATEST);
donationModel.setDonations(donationService.getLatestDonations(donationResponse, latest));
} else {
donationModel.setDonations(new ArrayList<>());
}
return templateService.renderEmbedTemplate(DONATIONS_RESPONSE_TEMPLATE_KEY, donationModel);
}

View File

@@ -0,0 +1,33 @@
package dev.sheldan.sissi.module.debra.config;
import lombok.extern.slf4j.Slf4j;
import org.ehcache.config.builders.CacheManagerBuilder;
import org.ehcache.jsr107.Eh107Configuration;
import org.ehcache.xml.XmlConfiguration;
import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.net.URL;
@Configuration
@Slf4j
@EnableCaching
public class CacheConfig {
@Bean
public JCacheManagerCustomizer cacheManagerCustomizer() {
URL myUrl = getClass().getResource("/donation-cache-config.xml");
XmlConfiguration xmlConfig = new XmlConfiguration(myUrl);
org.ehcache.CacheManager myCacheManager = CacheManagerBuilder.newCacheManager(xmlConfig);
return cm -> {
myCacheManager.getRuntimeConfiguration().getCacheConfigurations().entrySet().forEach(cacheConfiguration -> {
javax.cache.configuration.Configuration<?, ?> jConfiguration = Eh107Configuration.fromEhcacheCacheConfiguration(cacheConfiguration.getValue());
log.info("Creating custom cache: " + cacheConfiguration.getKey());
cm.createCache(cacheConfiguration.getKey(), jConfiguration);
});
};
}
}

View File

@@ -12,6 +12,7 @@ import java.util.List;
public class DebraFeatureConfig implements FeatureConfig {
public static final String DEBRA_DONATION_NOTIFICATION_DELAY_CONFIG_KEY = "debraDonationNotificationDelayMillis";
public static final String ENDLESS_STREAM_MINUTE_RATE = "endlessStreamMinuteRate";
public static final String DEBRA_DONATION_API_FETCH_SIZE_KEY = "debraDonationApiFetchSize";
public static final String DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME = "DEBRA_DONATION_NOTIFICATION_SERVER_ID";
@Override
@@ -26,6 +27,6 @@ public class DebraFeatureConfig implements FeatureConfig {
@Override
public List<String> getRequiredSystemConfigKeys() {
return Arrays.asList(DEBRA_DONATION_NOTIFICATION_DELAY_CONFIG_KEY, DEBRA_DONATION_API_FETCH_SIZE_KEY);
return Arrays.asList(DEBRA_DONATION_NOTIFICATION_DELAY_CONFIG_KEY, DEBRA_DONATION_API_FETCH_SIZE_KEY, ENDLESS_STREAM_MINUTE_RATE);
}
}

View File

@@ -2,4 +2,5 @@ package dev.sheldan.sissi.module.debra.config;
public class DebraSlashCommandNames {
public static final String DEBRA = "debra";
public static final String DEBRA_INTERNAL = "debrainternal";
}

View File

@@ -1,4 +1,4 @@
package dev.sheldan.sissi.module.debra;
package dev.sheldan.sissi.module.debra.exception;
import dev.sheldan.abstracto.core.exception.AbstractoTemplatableException;

View File

@@ -0,0 +1,71 @@
package dev.sheldan.sissi.module.debra.listener;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.config.ListenerPriority;
import dev.sheldan.abstracto.core.interaction.InteractionService;
import dev.sheldan.abstracto.core.interaction.button.listener.ButtonClickedListener;
import dev.sheldan.abstracto.core.interaction.button.listener.ButtonClickedListenerModel;
import dev.sheldan.abstracto.core.interaction.button.listener.ButtonClickedListenerResult;
import dev.sheldan.abstracto.core.service.MessageService;
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.templating.service.TemplateService;
import dev.sheldan.abstracto.core.utils.FutureUtils;
import dev.sheldan.sissi.module.debra.config.DebraFeatureDefinition;
import dev.sheldan.sissi.module.debra.service.DonationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class DebraInfoButtonClickedListener implements ButtonClickedListener {
@Autowired
private MessageService messageService;
@Autowired
private TemplateService templateService;
@Autowired
private InteractionService interactionService;
private static final String DEBRA_INFO_MESSAGE_TEMPLATE_KEY = "debraInfoMessage";
private static final String DEBRA_INFO_MESSAGE_RESPONSE_TEMPLATE_KEY = "debraInfoMessage_response";
@Override
public ButtonClickedListenerResult execute(ButtonClickedListenerModel model) {
MessageToSend messageToSend = templateService.renderEmbedTemplate(DEBRA_INFO_MESSAGE_TEMPLATE_KEY, new Object(), model.getServerId());
messageService.sendMessageToSendToUser(model.getEvent().getUser(), messageToSend).thenAccept(interactionHook -> {
log.info("Send debra info message to user {}", model.getEvent().getUser().getIdLong());
}).exceptionally(throwable -> {
log.error("Failed to send debra info message to user {}", model.getEvent().getUser().getIdLong(), throwable);
return null;
});
MessageToSend responseMessageToSend = templateService.renderEmbedTemplate(DEBRA_INFO_MESSAGE_RESPONSE_TEMPLATE_KEY, new Object(), model.getServerId());
FutureUtils.toSingleFutureGeneric(interactionService.sendMessageToInteraction(responseMessageToSend, model.getEvent().getInteraction().getHook()))
.thenAccept(interactionHook -> {
log.info("Send debra info message response to user {}", model.getEvent().getUser().getIdLong());
}).exceptionally(throwable -> {
log.error("Failed to send debra info message response to user {}", model.getEvent().getUser().getIdLong(), throwable);
return null;
});
return ButtonClickedListenerResult.ACKNOWLEDGED;
}
@Override
public Boolean handlesEvent(ButtonClickedListenerModel model) {
return model.getOrigin().equals(DonationService.DEBRA_INFO_BUTTON_ORIGIN);
}
@Override
public FeatureDefinition getFeature() {
return DebraFeatureDefinition.DEBRA;
}
@Override
public Integer getPriority() {
return ListenerPriority.MEDIUM;
}
}

View File

@@ -0,0 +1,20 @@
package dev.sheldan.sissi.module.debra.model.api;
import lombok.Builder;
import lombok.Getter;
import java.math.BigDecimal;
import java.math.BigInteger;
@Builder
@Getter
public class CampaignInfo {
private BigInteger donationCount;
private BigDecimal collected;
private BigDecimal target;
private String currency;
private String slug;
private String displayName;
private BigDecimal collectedNet;
private BigDecimal percent;
}

View File

@@ -1,5 +1,6 @@
package dev.sheldan.sissi.module.debra.model.api;
import com.google.gson.annotations.SerializedName;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
@@ -10,11 +11,18 @@ import java.math.BigDecimal;
@Setter
@Builder
public class Description {
@SerializedName("collected")
private BigDecimal collected;
@SerializedName("target")
private BigDecimal target;
@SerializedName("currency")
private String currency;
@SerializedName("slug")
private String slug;
@SerializedName("displayname")
private String displayName;
@SerializedName("collectednet")
private BigDecimal collectedNet;
@SerializedName("percent")
private BigDecimal percent;
}

View File

@@ -1,5 +1,6 @@
package dev.sheldan.sissi.module.debra.model.api;
import com.google.gson.annotations.SerializedName;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
@@ -10,10 +11,16 @@ import java.math.BigDecimal;
@Setter
@Builder
public class Donation {
@SerializedName("amount")
private BigDecimal amount;
@SerializedName("currency")
private String currency;
@SerializedName("text")
private String text;
@SerializedName("anonym")
private Integer anonym;
@SerializedName("firstname")
private String firstname;
@SerializedName("lastname")
private String lastname;
}

View File

@@ -0,0 +1,26 @@
package dev.sheldan.sissi.module.debra.model.api;
import dev.sheldan.sissi.module.debra.model.commands.DonationItemModel;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import java.math.BigDecimal;
@Getter
@Setter
@Builder
public class DonationInfo {
private String firstName;
private BigDecimal donationAmount;
private Boolean anonymous;
public static DonationInfo fromDonationItemModel(DonationItemModel donationItemModel) {
return DonationInfo
.builder()
.donationAmount(donationItemModel.getDonationAmount())
.anonymous(donationItemModel.getAnonymous())
.firstName(donationItemModel.getFirstName())
.build();
}
}

View File

@@ -0,0 +1,14 @@
package dev.sheldan.sissi.module.debra.model.api;
import lombok.Builder;
import lombok.Getter;
import java.math.BigDecimal;
import java.util.List;
@Getter
@Builder
public class DonationStats {
private List<DonationInfo> donations;
private BigDecimal totalAmount;
}

View File

@@ -1,5 +1,6 @@
package dev.sheldan.sissi.module.debra.model.api;
import com.google.gson.annotations.SerializedName;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
@@ -11,7 +12,10 @@ import java.util.List;
@Setter
@Builder
public class DonationsResponse {
@SerializedName("page")
private Description page;
@SerializedName("donation_count")
private BigInteger donationCount;
@SerializedName("donations")
private List<Donation> donations;
}

View File

@@ -0,0 +1,15 @@
package dev.sheldan.sissi.module.debra.model.api;
import lombok.Builder;
import lombok.Getter;
import java.time.Instant;
@Builder
@Getter
public class EndlessStreamInfo {
private Instant endDate;
private Instant startDate;
private Long donationAmount;
private Long minuteRate;
}

View File

@@ -0,0 +1,12 @@
package dev.sheldan.sissi.module.debra.model.commands;
import dev.sheldan.abstracto.core.interaction.button.ButtonPayload;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
@Builder
@Getter
@Setter
public class DebraInfoButtonPayload implements ButtonPayload {
}

View File

@@ -0,0 +1,10 @@
package dev.sheldan.sissi.module.debra.model.commands;
import lombok.Builder;
import lombok.Getter;
@Getter
@Builder
public class DebraInfoModel {
private String buttonId;
}

View File

@@ -2,10 +2,12 @@ package dev.sheldan.sissi.module.debra.model.commands;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import java.math.BigDecimal;
@Getter
@Setter
@Builder
public class DonationItemModel {
private String firstName;

View File

@@ -0,0 +1,31 @@
package dev.sheldan.sissi.module.debra.model.database;
import jakarta.persistence.*;
import lombok.*;
import java.time.Instant;
@Builder
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "endless_stream")
@Getter
@Setter
@EqualsAndHashCode
public class EndlessStream {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Long id;
@Column(name = "start_time")
private Instant startTime;
@Column(name = "created")
private Instant created;
@Column(name = "updated")
private Instant updated;
}

View File

@@ -0,0 +1,9 @@
package dev.sheldan.sissi.module.debra.repository;
import dev.sheldan.sissi.module.debra.model.database.EndlessStream;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface EndlessStreamRepository extends JpaRepository<EndlessStream, Long> {
}

View File

@@ -2,28 +2,39 @@ package dev.sheldan.sissi.module.debra.service;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
import dev.sheldan.abstracto.core.interaction.ComponentPayloadService;
import dev.sheldan.abstracto.core.interaction.ComponentService;
import dev.sheldan.abstracto.core.models.database.AServer;
import dev.sheldan.abstracto.core.service.ChannelService;
import dev.sheldan.abstracto.core.service.ConfigService;
import dev.sheldan.abstracto.core.service.PostTargetService;
import dev.sheldan.abstracto.core.service.management.ServerManagementService;
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.templating.service.TemplateService;
import dev.sheldan.abstracto.core.utils.FutureUtils;
import dev.sheldan.sissi.module.debra.DonationAmountNotFoundException;
import dev.sheldan.sissi.module.debra.exception.DonationAmountNotFoundException;
import dev.sheldan.sissi.module.debra.config.DebraPostTarget;
import dev.sheldan.sissi.module.debra.config.DebraProperties;
import dev.sheldan.sissi.module.debra.converter.DonationConverter;
import dev.sheldan.sissi.module.debra.model.api.Donation;
import dev.sheldan.sissi.module.debra.model.api.DonationsResponse;
import dev.sheldan.sissi.module.debra.model.commands.DebraInfoButtonPayload;
import dev.sheldan.sissi.module.debra.model.commands.DebraInfoModel;
import dev.sheldan.sissi.module.debra.model.commands.DonationItemModel;
import dev.sheldan.sissi.module.debra.model.commands.DonationsModel;
import dev.sheldan.sissi.module.debra.model.listener.DonationResponseModel;
import dev.sheldan.sissi.module.debra.model.listener.DonationNotificationModel;
import lombok.extern.slf4j.Slf4j;
import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.io.IOException;
import java.math.BigDecimal;
@@ -60,10 +71,28 @@ public class DonationService {
@Autowired
private ConfigService configService;
@Autowired
private ChannelService channelService;
@Autowired
private ComponentService componentService;
@Autowired
private ComponentPayloadService componentPayloadService;
@Autowired
private ServerManagementService serverManagementService;
@Autowired
private DonationService self;
private static final String DEBRA_DONATION_NOTIFICATION_TEMPLATE_KEY = "debra_donation_notification";
private static final Pattern MESSAGE_PATTERN = Pattern.compile("(.*) hat (\\d{1,9},\\d{2}) Euro gespendet!<br \\/>Vielen Dank!<br \\/>Nachricht:<br \\/>(.*)");
private static final String DEBRA_INFO_BUTTON_MESSAGE_TEMPLATE_KEY = "debraInfoButton";
public static final String DEBRA_INFO_BUTTON_ORIGIN = "DEBRA_INFO_BUTTON";
public DonationResponseModel parseDonationFromMessage(String message) {
Matcher matcher = MESSAGE_PATTERN.matcher(message);
if (matcher.find()) {
@@ -105,23 +134,34 @@ public class DonationService {
.collect(Collectors.toList());
}
public DonationsResponse fetchCurrentDonationAmount(Long serverId) throws IOException {
Long fetchSize = configService.getLongValueOrConfigDefault(DEBRA_DONATION_API_FETCH_SIZE_KEY, serverId);
Request request = new Request.Builder()
.url(String.format(debraProperties.getDonationAPIUrl(), fetchSize))
.get()
.build();
Response response = okHttpClient.newCall(request).execute();
if(!response.isSuccessful()) {
if (log.isDebugEnabled()) {
log.error("Failed to retrieve urban dictionary definition. Response had code {} with body {}.",
response.code(), response.body());
}
throw new DonationAmountNotFoundException();
}
Gson gson = getGson();
public synchronized DonationsResponse getSynchronizedCachedDonationAmount(Long serverId) {
return self.getCachedDonationAmount(serverId);
}
@Cacheable(value = "donation-cache")
public synchronized DonationsResponse getCachedDonationAmount(Long serverId) {
return self.fetchCurrentDonationAmount(serverId);
}
public DonationsResponse fetchCurrentDonationAmount(Long serverId) {
try {
Long fetchSize = configService.getLongValueOrConfigDefault(DEBRA_DONATION_API_FETCH_SIZE_KEY, serverId);
Request request = new Request.Builder()
.url(String.format(debraProperties.getDonationAPIUrl(), fetchSize))
.get()
.build();
Response response = okHttpClient.newCall(request).execute();
if(!response.isSuccessful()) {
log.error("Failed to retrieve donation response. Response had code {} with body {} and headers {}.",
response.code(), response.body().string(), response.headers());
throw new DonationAmountNotFoundException();
}
Gson gson = getGson();
return gson.fromJson(response.body().string(), DonationsResponse.class);
} catch (Exception exception) {
throw new AbstractoRunTimeException(exception);
}
return gson.fromJson(response.body().string(), DonationsResponse.class);
}
private Gson getGson() {
@@ -130,7 +170,7 @@ public class DonationService {
.create();
}
private DonationsModel getDonationInfoModel(Long serverId) throws IOException {
private DonationsModel getDonationInfoModel(Long serverId) {
return donationConverter.convertDonationResponse(fetchCurrentDonationAmount(serverId));
}
@@ -148,4 +188,26 @@ public class DonationService {
firstMessage.addAll(secondMessage);
return FutureUtils.toSingleFutureGeneric(firstMessage);
}
public CompletableFuture<Void> sendDebraInfoButtonMessage(GuildMessageChannel guildMessageChannel) {
String buttonId = componentService.generateComponentId();
DebraInfoModel model = DebraInfoModel
.builder()
.buttonId(buttonId)
.build();
MessageToSend messageToSend = templateService.renderEmbedTemplate(DEBRA_INFO_BUTTON_MESSAGE_TEMPLATE_KEY, model, guildMessageChannel.getGuild().getIdLong());
return FutureUtils.toSingleFutureGeneric(channelService.sendMessageToSendToChannel(messageToSend, guildMessageChannel)).thenAccept(unused -> {
self.persistButtonPayload(guildMessageChannel, buttonId);
});
}
@Transactional
public void persistButtonPayload(GuildMessageChannel guildMessageChannel, String buttonId) {
DebraInfoButtonPayload payload = DebraInfoButtonPayload
.builder()
.build();
AServer server = serverManagementService.loadServer(guildMessageChannel.getGuild().getIdLong());
componentPayloadService.createButtonPayload(buttonId, payload, DEBRA_INFO_BUTTON_ORIGIN, server);
}
}

View File

@@ -0,0 +1,17 @@
package dev.sheldan.sissi.module.debra.service.management;
import dev.sheldan.sissi.module.debra.model.database.EndlessStream;
import dev.sheldan.sissi.module.debra.repository.EndlessStreamRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class EndlessStreamManagementServiceBean {
@Autowired
private EndlessStreamRepository endlessStreamRepository;
public EndlessStream getEndlessStream(Long id) {
return endlessStreamRepository.getReferenceById(id);
}
}

View File

@@ -5,10 +5,13 @@ abstracto.postTargets.debraDonationNotification.name=debraDonationNotification
abstracto.postTargets.debraDonationNotification2.name=debraDonationNotification2
sissi.debra.websocketURL=ws://spenden.baba.fm:8765/
sissi.debra.donationAPIUrl=https://www.altruja.de/api/page/discord-fuer-debra-2022?details=1&num=%s&ort=0
sissi.debra.donationAPIUrl=https://www.altruja.de/api/page/discord-gg-austria-fuer-debra-2023?details=1&num=%s&ort=0
abstracto.systemConfigs.debraDonationNotificationDelayMillis.name=debraDonationNotificationDelayMillis
abstracto.systemConfigs.debraDonationNotificationDelayMillis.longValue=60000
abstracto.systemConfigs.endlessStreamMinuteRate.name=endlessStreamMinuteRate
abstracto.systemConfigs.endlessStreamMinuteRate.longValue=1
abstracto.systemConfigs.debraDonationApiFetchSize.name=debraDonationApiFetchSize
abstracto.systemConfigs.debraDonationApiFetchSize.longValue=1000

View File

@@ -0,0 +1,24 @@
<config
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns='http://www.ehcache.org/v3'
xsi:schemaLocation="
http://www.ehcache.org/v3
http://www.ehcache.org/schema/ehcache-core-3.8-1.xsd">
<cache uses-template="default" alias="donation-cache">
<expiry>
<ttl unit="seconds">120</ttl>
</expiry>
<resources>
<heap unit="entries">5</heap>
</resources>
</cache>
<cache-template name="default">
<expiry>
<ttl unit="seconds">600</ttl>
</expiry>
<resources>
<heap>50</heap>
</resources>
</cache-template>
</config>

View File

@@ -1,10 +1,6 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="seedData/data.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<property name="utilityModule" value="(SELECT id FROM module WHERE name = 'utility')"/>
<property name="debraFeature" value="(SELECT id FROM feature WHERE key = 'debra')"/>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="feature.xml" relativeToChangelogFile="true"/>
<include file="command.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<changeSet author="Sheldan" id="debra_feature-insertion">
<insert tableName="feature">
<column name="key" value="debra"/>

View File

@@ -0,0 +1,6 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="seedData/data.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,16 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<property name="utilityModule" value="(SELECT id FROM module WHERE name = 'utility')"/>
<property name="debraFeature" value="(SELECT id FROM feature WHERE key = 'debra')"/>
<changeSet author="Sheldan" id="debraInfoButton-command">
<insert tableName="command">
<column name="name" value="debraInfoButton"/>
<column name="module_id" valueComputed="${utilityModule}"/>
<column name="feature_id" valueComputed="${debraFeature}"/>
</insert>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,6 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="command.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,6 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="tables/tables.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,28 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<changeSet author="Sheldan" id="endless_stream-table">
<createTable tableName="endless_stream">
<column name="id" autoIncrement="true" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="start_time" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="false"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="false"/>
</column>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
</createTable>
<sql>
DROP TRIGGER IF EXISTS endless_stream_update_trigger ON endless_stream;
CREATE TRIGGER endless_stream_update_trigger BEFORE UPDATE ON endless_stream FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
</sql>
<sql>
DROP TRIGGER IF EXISTS endless_stream_insert_trigger ON endless_stream;
CREATE TRIGGER endless_stream_insert_trigger BEFORE INSERT ON endless_stream FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
</sql>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,6 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="endless_stream.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -1,10 +1,8 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="1.3.6/collection.xml" relativeToChangelogFile="true"/>
<include file="1.4.21/collection.xml" relativeToChangelogFile="true"/>
<include file="1.4.29/collection.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application</groupId>
<artifactId>sissi-modules</artifactId>
<version>1.3.22</version>
<version>1.4.45</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,6 +5,7 @@ import dev.sheldan.abstracto.core.command.condition.AbstractConditionableCommand
import dev.sheldan.abstracto.core.command.config.CommandConfiguration;
import dev.sheldan.abstracto.core.command.config.HelpInfo;
import dev.sheldan.abstracto.core.command.config.Parameter;
import dev.sheldan.abstracto.core.command.config.validator.MaxStringLengthValidator;
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
@@ -73,6 +74,7 @@ public class CreateMeetup extends AbstractConditionableCommand {
private static final String DESCRIPTION_PARAMETER = "description";
private static final String LOCATION_PARAMETER = "location";
private static final String CONFIRMATION_TEMPLATE = "createMeetup_confirmation";
private static final String DEFAULT_LOCATION_STRING = "\"\"";
@Override
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
@@ -87,7 +89,7 @@ public class CreateMeetup extends AbstractConditionableCommand {
}
AUserInAServer organizer = userInServerManagementService.loadOrCreateUser(commandContext.getAuthor());
AChannel meetupChannel = channelManagementService.loadChannel(commandContext.getChannel().getIdLong());
Meetup meetup = meetupManagementServiceBean.createMeetup(meetupTime, meetupTopic, description, organizer, meetupChannel, null);
Meetup meetup = meetupManagementServiceBean.createMeetup(meetupTime, meetupTopic, description, organizer, meetupChannel, DEFAULT_LOCATION_STRING);
String confirmationId = componentService.generateComponentId();
String cancelId = componentService.generateComponentId();
MeetupConfirmationModel model = MeetupConfirmationModel
@@ -124,7 +126,7 @@ public class CreateMeetup extends AbstractConditionableCommand {
if(slashCommandParameterService.hasCommandOption(LOCATION_PARAMETER, event)) {
location = slashCommandParameterService.getCommandOption(LOCATION_PARAMETER, event, String.class);
} else {
location = null;
location = DEFAULT_LOCATION_STRING;
}
Instant meetupTime = Instant.ofEpochSecond(time);
AUserInAServer organizer = userInServerManagementService.loadOrCreateUser(event.getMember());

View File

@@ -49,19 +49,19 @@ public class ListMeetups extends AbstractConditionableCommand {
@Override
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
MessageToSend messageToSend = getMessageToSend(commandContext.getGuild().getIdLong());
MessageToSend messageToSend = getMessageToSend(commandContext.getGuild().getIdLong(), commandContext.getChannel().getIdLong());
return FutureUtils.toSingleFutureGeneric(channelService.sendMessageToSendToChannel(messageToSend, commandContext.getChannel()))
.thenApply(unused -> CommandResult.fromIgnored());
}
@Override
public CompletableFuture<CommandResult> executeSlash(SlashCommandInteractionEvent event) {
return interactionService.replyMessageToSend(getMessageToSend(event.getGuild().getIdLong()), event)
return interactionService.replyMessageToSend(getMessageToSend(event.getGuild().getIdLong(), event.getChannel().getIdLong()), event)
.thenApply(interactionHook -> CommandResult.fromSuccess());
}
private MessageToSend getMessageToSend(Long serverId) {
List<Meetup> meetups = meetupManagementServiceBean.getIncomingMeetups();
private MessageToSend getMessageToSend(Long serverId, Long channelId) {
List<Meetup> meetups = meetupManagementServiceBean.getIncomingMeetups(serverId, channelId);
List<MeetupListItemModel> listItems = meetups
.stream()
.map(MeetupListItemModel::fromMeetup)

View File

@@ -2,8 +2,14 @@ package dev.sheldan.sissi.module.meetup.config;
import dev.sheldan.abstracto.core.config.FeatureConfig;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.config.FeatureMode;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.List;
import static dev.sheldan.sissi.module.meetup.config.MeetupFeatureMode.ATTACH_ICS_FILE;
@Component
public class MeetupFeatureConfig implements FeatureConfig {
@Override
@@ -11,4 +17,8 @@ public class MeetupFeatureConfig implements FeatureConfig {
return MeetupFeatureDefinition.MEETUP;
}
@Override
public List<FeatureMode> getAvailableModes() {
return Arrays.asList(ATTACH_ICS_FILE);
}
}

View File

@@ -0,0 +1,15 @@
package dev.sheldan.sissi.module.meetup.config;
import dev.sheldan.abstracto.core.config.FeatureMode;
import lombok.Getter;
@Getter
public enum MeetupFeatureMode implements FeatureMode {
ATTACH_ICS_FILE("attachIcsFile");
private final String key;
MeetupFeatureMode(String key) {
this.key = key;
}
}

View File

@@ -16,7 +16,6 @@ import org.springframework.stereotype.Component;
@PersistJobDataAfterExecution
public class MeetupCleanupJob extends QuartzJobBean {
@Autowired
private MeetupServiceBean meetupServiceBean;

View File

@@ -16,6 +16,7 @@ import dev.sheldan.abstracto.core.service.MessageService;
import dev.sheldan.abstracto.core.service.management.ChannelManagementService;
import dev.sheldan.abstracto.core.service.management.ServerManagementService;
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.utils.FileService;
import dev.sheldan.abstracto.core.utils.FutureUtils;
import dev.sheldan.sissi.module.meetup.config.MeetupFeatureDefinition;
import dev.sheldan.sissi.module.meetup.model.database.Meetup;
@@ -76,6 +77,9 @@ public class MeetupConfirmationListener implements ButtonClickedListener {
@Autowired
private MeetupComponentManagementServiceBean meetupComponentManagementServiceBean;
@Autowired
private FileService fileService;
@Override
public ButtonClickedListenerResult execute(ButtonClickedListenerModel model) {
MeetupConfirmationPayload payload = (MeetupConfirmationPayload) model.getDeserializedPayload();
@@ -115,6 +119,9 @@ public class MeetupConfirmationListener implements ButtonClickedListener {
List<CompletableFuture<Message>> messageFutures = channelService.sendMessageToSendToChannel(messageToSend, model.getEvent().getMessageChannel());
FutureUtils.toSingleFutureGeneric(messageFutures).thenAccept(unused -> {
messageService.deleteMessage(model.getEvent().getMessage());
messageToSend.getAttachedFiles().forEach(attachedFile -> {
fileService.safeDeleteIgnoreException(attachedFile.getFile());
});
Message meetupMessage = messageFutures.get(0).join();
messageService.pinMessage(meetupMessage);
self.persistPayloads(meetupId, serverId, yesButtonId, noButtonId, maybeButtonId, noTimeButtonId, meetupMessage);

View File

@@ -6,7 +6,7 @@ import dev.sheldan.abstracto.core.models.database.AServer;
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
import lombok.*;
import javax.persistence.*;
import jakarta.persistence.*;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;

View File

@@ -4,7 +4,7 @@ import dev.sheldan.abstracto.core.models.database.ComponentPayload;
import dev.sheldan.sissi.module.meetup.model.database.embed.MeetupComponentId;
import lombok.*;
import javax.persistence.*;
import jakarta.persistence.*;
import java.time.Instant;
@Builder

View File

@@ -4,7 +4,7 @@ import dev.sheldan.abstracto.core.models.database.AUserInAServer;
import dev.sheldan.sissi.module.meetup.model.database.embed.MeetupParticipationId;
import lombok.*;
import javax.persistence.*;
import jakarta.persistence.*;
import java.time.Instant;
@Builder

View File

@@ -2,8 +2,8 @@ package dev.sheldan.sissi.module.meetup.model.database.embed;
import lombok.*;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import java.io.Serializable;
@Embeddable

View File

@@ -2,8 +2,8 @@ package dev.sheldan.sissi.module.meetup.model.database.embed;
import lombok.*;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import java.io.Serializable;
@Embeddable

View File

@@ -0,0 +1,17 @@
package dev.sheldan.sissi.module.meetup.model.template;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
@Getter
@Builder
@Setter
public class MeetupIcsModel {
private Boolean attachIcsFile;
private String iceFileName;
private String icsFormattedCreationTime;
private String icsFormattedStartTime;
private String icsFormattedEndTime;
}

View File

@@ -16,6 +16,7 @@ public class MeetupMessageModel {
private String description;
private Instant meetupTime;
private String location;
private String decodedLocation;
private MemberDisplay organizer;
private Long meetupId;
private String yesId;
@@ -27,4 +28,5 @@ public class MeetupMessageModel {
private List<MemberDisplay> maybeParticipants;
private List<MemberDisplay> noTimeParticipants;
private List<MemberDisplay> declinedParticipants;
private MeetupIcsModel meetupIcsModel;
}

View File

@@ -12,7 +12,6 @@ import java.util.List;
@Repository
public interface MeetupRepository extends JpaRepository<Meetup, ServerSpecificId> {
List<Meetup> findByMeetupTimeLessThan(Instant date);
List<Meetup> findByMeetupTimeGreaterThan(Instant date);
List<Meetup> findByMeetupTimeGreaterThanAndState(Instant date, MeetupState state);
List<Meetup> findByMeetupTimeGreaterThanAndStateAndServer_IdAndMeetupChannel_Id(Instant date, MeetupState state, Long serverId, Long channelId);
List<Meetup> findByState(MeetupState state);
}

View File

@@ -10,9 +10,12 @@ import dev.sheldan.abstracto.core.service.*;
import dev.sheldan.abstracto.core.service.management.ServerManagementService;
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.templating.service.TemplateService;
import dev.sheldan.abstracto.core.utils.FileService;
import dev.sheldan.abstracto.core.utils.FutureUtils;
import dev.sheldan.abstracto.scheduling.model.JobParameters;
import dev.sheldan.abstracto.scheduling.service.SchedulerService;
import dev.sheldan.sissi.module.meetup.config.MeetupFeatureDefinition;
import dev.sheldan.sissi.module.meetup.config.MeetupFeatureMode;
import dev.sheldan.sissi.module.meetup.model.command.MeetupChangeTimeConfirmationModel;
import dev.sheldan.sissi.module.meetup.model.command.MeetupConfirmationModel;
import dev.sheldan.sissi.module.meetup.model.database.Meetup;
@@ -21,6 +24,7 @@ import dev.sheldan.sissi.module.meetup.model.database.MeetupParticipant;
import dev.sheldan.sissi.module.meetup.model.database.MeetupState;
import dev.sheldan.sissi.module.meetup.model.payload.MeetupChangeTimeConfirmationPayload;
import dev.sheldan.sissi.module.meetup.model.payload.MeetupConfirmationPayload;
import dev.sheldan.sissi.module.meetup.model.template.MeetupIcsModel;
import dev.sheldan.sissi.module.meetup.model.template.MeetupMessageModel;
import dev.sheldan.sissi.module.meetup.model.template.MeetupNotificationModel;
import dev.sheldan.sissi.module.meetup.model.template.MeetupTimeChangedNotificationModel;
@@ -38,6 +42,9 @@ import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.concurrent.CompletableFuture;
@@ -79,6 +86,9 @@ public class MeetupServiceBean {
@Autowired
private MeetupServiceBean self;
@Autowired
private FileService fileService;
@Autowired
private ChannelService channelService;
@@ -91,11 +101,16 @@ public class MeetupServiceBean {
@Autowired
private SchedulerService schedulerService;
@Autowired
private FeatureModeService featureModeService;
@Autowired
private MeetupParticipatorManagementServiceBean meetupParticipatorManagementServiceBean;
@Autowired
private MeetupComponentManagementServiceBean meetupComponentManagementServiceBean;
private static final String ICS_TIME_STAMP_FORMAT = "yMMdd'T'kkmmss'Z'";
private static final DateTimeFormatter ICS_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern(ICS_TIME_STAMP_FORMAT);
public void storeMeetupConfirmation(MeetupConfirmationModel model) {
AServer server = serverManagementService.loadServer(model.getGuildId());
@@ -126,6 +141,22 @@ public class MeetupServiceBean {
componentPayloadService.createButtonPayload(model.getCancelId(), confirmationPayload, MEETUP_CHANGE_TIME_CONFIRMATION_BUTTON, server);
}
private MeetupIcsModel getMeetupICSModel(Meetup meetup) {
ZonedDateTime startTime = meetup.getMeetupTime().atZone(ZoneId.of("UTC"));
ZonedDateTime endTime = meetup.getMeetupTime().plus(1, ChronoUnit.HOURS).atZone(ZoneId.of("UTC"));
String icsFormattedStartTime = startTime.format(ICS_DATE_TIME_FORMATTER);
String icsFormattedEndTime = endTime.format(ICS_DATE_TIME_FORMATTER);
String icsFormattedMeetupCreationTime = Instant.now().atZone(ZoneId.of("UTC"))
.format(ICS_DATE_TIME_FORMATTER);
boolean attachIcsFile = featureModeService.featureModeActive(MeetupFeatureDefinition.MEETUP, meetup.getServer().getId(), MeetupFeatureMode.ATTACH_ICS_FILE);
return MeetupIcsModel
.builder()
.attachIcsFile(attachIcsFile)
.icsFormattedCreationTime(icsFormattedMeetupCreationTime)
.icsFormattedStartTime(icsFormattedStartTime)
.icsFormattedEndTime(icsFormattedEndTime)
.build();
}
public MeetupMessageModel getMeetupMessageModel(Meetup meetup) {
List<MeetupParticipant> allParticipants = meetup.getParticipants();
@@ -145,11 +176,13 @@ public class MeetupServiceBean {
.stream()
.filter(meetupParticipator -> meetupParticipator.getDecision().equals(MeetupDecision.NO_TIME))
.collect(Collectors.toList());
String rawLocation = java.net.URLDecoder.decode(meetup.getLocation(), StandardCharsets.UTF_8);
return MeetupMessageModel
.builder()
.description(meetup.getDescription())
.topic(meetup.getTopic())
.location(meetup.getLocation())
.decodedLocation(rawLocation)
.noTimeId(meetup.getNoTimeButtonId())
.yesId(meetup.getYesButtonId())
.maybeId(meetup.getMaybeButtonId())
@@ -162,6 +195,7 @@ public class MeetupServiceBean {
.maybeParticipants(getMemberDisplays(maybe))
.cancelled(meetup.getState().equals(MeetupState.CANCELLED))
.organizer(MemberDisplay.fromAUserInAServer(meetup.getOrganizer()))
.meetupIcsModel(getMeetupICSModel(meetup))
.build();
}
@@ -391,8 +425,9 @@ public class MeetupServiceBean {
MessageToSend updatedMeetupMessage = getMeetupMessage(meetupMessageModel);
GuildMessageChannel meetupChannel = channelService.getMessageChannelFromServer(serverId, meetup.getMeetupChannel().getId());
return channelService.editEmbedMessageInAChannel(updatedMeetupMessage.getEmbeds().get(0), meetupChannel, meetup.getMessageId())
return channelService.editMessageInAChannelFuture(updatedMeetupMessage, meetupChannel, meetup.getMessageId())
.thenAccept(message -> log.info("Updated message of meetup {} in channel {} in server {}.", meetupId, meetup.getMeetupChannel().getId(), serverId))
.thenAccept(unused -> fileService.safeDeleteIgnoreException(updatedMeetupMessage.getAttachedFiles().get(0).getFile()))
.exceptionally(throwable -> {
log.info("Failed to update message of meetup {} in channel {} in server {}.", meetupId, meetup.getMeetupChannel().getId(), serverId, throwable);
return null;
@@ -426,6 +461,7 @@ public class MeetupServiceBean {
GuildMessageChannel meetupChannel = channelService.getMessageChannelFromServer(serverId, meetup.getMeetupChannel().getId());
return channelService.editMessageInAChannelFuture(updatedMeetupMessage, meetupChannel, meetup.getMessageId())
.thenAccept(message -> log.info("Updated message of meetup {} in channel {} in server {}.", meetupId, meetup.getMeetupChannel().getId(), serverId))
.thenAccept(unused -> fileService.safeDeleteIgnoreException(updatedMeetupMessage.getAttachedFiles().get(0).getFile()))
.exceptionally(throwable -> {
log.info("Failed to update message of meetup {} in channel {} in server {}.", meetupId, meetup.getMeetupChannel().getId(), serverId, throwable);
return null;

View File

@@ -72,12 +72,8 @@ public class MeetupManagementServiceBean {
return meetupRepository.findByState(MeetupState.CANCELLED);
}
public List<Meetup> getFutureMeetups() {
return meetupRepository.findByMeetupTimeGreaterThan(Instant.now());
}
public List<Meetup> getIncomingMeetups() {
return meetupRepository.findByMeetupTimeGreaterThanAndState(Instant.now(), MeetupState.CONFIRMED);
public List<Meetup> getIncomingMeetups(Long serverId, Long channelId) {
return meetupRepository.findByMeetupTimeGreaterThanAndStateAndServer_IdAndMeetupChannel_Id(Instant.now(), MeetupState.CONFIRMED, serverId, channelId);
}
public void deleteMeetups(List<Meetup> meetups) {

View File

@@ -5,4 +5,8 @@ abstracto.systemConfigs.meetupEarlyReminderSeconds.name=meetupEarlyReminderSecon
abstracto.systemConfigs.meetupEarlyReminderSeconds.longValue=604800
abstracto.systemConfigs.meetupLateReminderSeconds.name=meetupLateReminderSeconds
abstracto.systemConfigs.meetupLateReminderSeconds.longValue=86400
abstracto.systemConfigs.meetupLateReminderSeconds.longValue=86400
abstracto.featureModes.attachIcsFile.featureName=meetup
abstracto.featureModes.attachIcsFile.mode=attachIcsFile
abstracto.featureModes.attachIcsFile.enabled=false

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="tables/tables.xml" relativeToChangelogFile="true"/>
<include file="seedData/data.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<property name="utilityModule" value="(SELECT id FROM module WHERE name = 'utility')"/>
<property name="meetupFeature" value="(SELECT id FROM feature WHERE key = 'meetup')"/>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="feature.xml" relativeToChangelogFile="true"/>
<include file="command.xml" relativeToChangelogFile="true"/>
<include file="reminder_job.xml" relativeToChangelogFile="true"/>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<changeSet author="Sheldan" id="meetup_feature-insertion">
<insert tableName="feature">
<column name="key" value="meetup"/>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<changeSet author="Sheldan" id="meetup-cleanup-job-insert">
<insert tableName="scheduler_job">
<column name="name" value="meetupCleanupJob"/>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<changeSet author="Sheldan" id="meetup-reminder-job-insert">
<insert tableName="scheduler_job">
<column name="name" value="meetupReminderJob"/>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<changeSet author="Sheldan" id="meetup-table">
<createTable tableName="meetup">
<column name="id" type="BIGINT">

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<changeSet author="Sheldan" id="meetup_participator-table">
<createTable tableName="meetup_participator">
<column name="meetup_participator_user_in_server_id" type="BIGINT">

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="meetup.xml" relativeToChangelogFile="true"/>
<include file="meetup_participator.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="seedData/data.xml" relativeToChangelogFile="true"/>
<include file="tables/tables.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<property name="utilityModule" value="(SELECT id FROM module WHERE name = 'utility')"/>
<property name="meetupFeature" value="(SELECT id FROM feature WHERE key = 'meetup')"/>

View File

@@ -1,10 +1,6 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<include file="command.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -1,11 +1,7 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
<changeSet author="Sheldan" id="meetup_component-table">
<createTable tableName="meetup_component">
<column name="component_id" type="VARCHAR(100)">

Some files were not shown because too many files have changed in this diff Show More