From 143c37c1c47c8a9af4b8c4d480e9a6bcf242bb03 Mon Sep 17 00:00:00 2001 From: Magnus Schieder <50337967+m-schieder@users.noreply.github.com> Date: Mon, 5 May 2025 15:03:04 +0200 Subject: [PATCH 01/60] Updated services (#6907) Co-authored-by: Magnus Schieder --- VERSION | 2 +- openslides-client | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 166f28a9bd..069f0992a2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.2.8-dev +4.2.9-dev diff --git a/openslides-client b/openslides-client index b21b67da1f..e4d35321a0 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit b21b67da1ffede56e736d85cce23762338de37b3 +Subproject commit e4d35321a06580c87dc4af43bff2db25ca374901 From 9b0cd2774a9270de5a75a1ec6fa8252a7d131ad0 Mon Sep 17 00:00:00 2001 From: rrenkert Date: Mon, 5 May 2025 16:33:12 +0200 Subject: [PATCH 02/60] Create patchnotes for 4.2.9 (#6908) --- patchnotes/4.2.9.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 patchnotes/4.2.9.md diff --git a/patchnotes/4.2.9.md b/patchnotes/4.2.9.md new file mode 100644 index 0000000000..cb1566c68f --- /dev/null +++ b/patchnotes/4.2.9.md @@ -0,0 +1,10 @@ +## Patchnotes 4.2.9 + +### New Features + +### Optimizations +- PDF export: PDF files are exported in the PDF/A-3a standard + +### Bug Fixes +- Motions > Change recommendations: Editing of change recommendations with changed line numbering was not possible +- Motions > Forwarding: Fixed a bug where newly created change recommendations were not visible in forwarded motions. From 706b044f4e79259d1a4b4751a5362fb2ad17dc96 Mon Sep 17 00:00:00 2001 From: Magnus Schieder <50337967+m-schieder@users.noreply.github.com> Date: Wed, 7 May 2025 15:35:22 +0200 Subject: [PATCH 03/60] Updated services (#6911) --- VERSION | 2 +- openslides-client | 2 +- openslides-search-service | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 069f0992a2..c7457e92b1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.2.9-dev +4.2.10-dev diff --git a/openslides-client b/openslides-client index e4d35321a0..78a412a767 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit e4d35321a06580c87dc4af43bff2db25ca374901 +Subproject commit 78a412a767717b082b6d3f81bcff6657e8930b53 diff --git a/openslides-search-service b/openslides-search-service index 1163530800..ad9bf422ed 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit 116353080042b91d0d95b17f690e2f1f80e57b61 +Subproject commit ad9bf422ed9bbfbf8e2ab8b80f6fe703d56dccd8 From 51754c14ec2cf37147ddc38505df987dae1d0311 Mon Sep 17 00:00:00 2001 From: rrenkert Date: Wed, 7 May 2025 17:34:27 +0200 Subject: [PATCH 04/60] Create patchnotes for 4.2.10 (#6913) --- patchnotes/4.2.10.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 patchnotes/4.2.10.md diff --git a/patchnotes/4.2.10.md b/patchnotes/4.2.10.md new file mode 100644 index 0000000000..4f00904571 --- /dev/null +++ b/patchnotes/4.2.10.md @@ -0,0 +1,9 @@ +## Patchnotes 4.2.10 + +### Optimizations +- Dialogs: Closing/canceling all dialogs is now possible with ESC. +- eVoting > Result display: Comma or point is used as decimal separator for results depending on the meeting language. + +### Bug fixes +- Motions > Export: Fixed a bug where the sorting was done by IDs and not by the displayed sorting when exporting via multiselect. +- eVoting > Progress bar in autopilot: Progress bar was not visible in autopilot. From ecde8fa9db8b4ca2d17b729e565dde4140107711 Mon Sep 17 00:00:00 2001 From: Magnus Schieder <50337967+m-schieder@users.noreply.github.com> Date: Mon, 12 May 2025 17:19:01 +0200 Subject: [PATCH 05/60] Updated services (#6915) --- VERSION | 2 +- lib/openslides-go | 2 +- openslides-autoupdate-service | 2 +- openslides-icc-service | 2 +- openslides-search-service | 2 +- openslides-vote-service | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index c7457e92b1..bfa6f6a91f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.2.10-dev +4.2.11-dev diff --git a/lib/openslides-go b/lib/openslides-go index 8aac50248e..03468a35b4 160000 --- a/lib/openslides-go +++ b/lib/openslides-go @@ -1 +1 @@ -Subproject commit 8aac50248ebfa6bdd37d25590d87f6095adfb012 +Subproject commit 03468a35b41c21dc0ad0d0b54035e1a43e189d2d diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 6e33603ab9..7575e34f53 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 6e33603ab9f69d56cbfec57ca5a40f693c729bf7 +Subproject commit 7575e34f53f9f57caa6eda4a388f7ae67ee8cecd diff --git a/openslides-icc-service b/openslides-icc-service index 52efdd8788..b5c9013a6a 160000 --- a/openslides-icc-service +++ b/openslides-icc-service @@ -1 +1 @@ -Subproject commit 52efdd878869a4f3bcf26a478515187297459486 +Subproject commit b5c9013a6a58e0b3574f5571f4831ba866c72f06 diff --git a/openslides-search-service b/openslides-search-service index ad9bf422ed..3e098bce51 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit ad9bf422ed9bbfbf8e2ab8b80f6fe703d56dccd8 +Subproject commit 3e098bce51c8610615f30730633bef8375aaa669 diff --git a/openslides-vote-service b/openslides-vote-service index e578a2ce98..949e649cd9 160000 --- a/openslides-vote-service +++ b/openslides-vote-service @@ -1 +1 @@ -Subproject commit e578a2ce987b2d136c5cbfa193c65d5a7931deeb +Subproject commit 949e649cd9db744634bb1c4bb75269f0163849b3 From f6c55643d9c6b7063440717cc4e656c8189c1e1c Mon Sep 17 00:00:00 2001 From: rrenkert Date: Mon, 12 May 2025 17:44:42 +0200 Subject: [PATCH 06/60] Create patchnotes for 4.2.11 (#6916) --- patchnotes/4.2.11.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 patchnotes/4.2.11.md diff --git a/patchnotes/4.2.11.md b/patchnotes/4.2.11.md new file mode 100644 index 0000000000..8b781f1a7c --- /dev/null +++ b/patchnotes/4.2.11.md @@ -0,0 +1,4 @@ +## Patchnotes 4.2.11 + +### Bug Fixes +- eVoting: The progress bar shows reliable data. From cb77d4451b914e023ea7b26699199dfe1308626b Mon Sep 17 00:00:00 2001 From: Magnus Schieder <50337967+m-schieder@users.noreply.github.com> Date: Wed, 14 May 2025 15:52:35 +0200 Subject: [PATCH 07/60] Updated services (#6919) --- VERSION | 2 +- openslides-auth-service | 2 +- openslides-backend | 2 +- openslides-client | 2 +- openslides-datastore-service | 2 +- openslides-vote-service | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index bfa6f6a91f..adf9931296 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.2.11-dev +4.2.12-dev diff --git a/openslides-auth-service b/openslides-auth-service index fca6afbf6a..acc153e8b8 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit fca6afbf6ad5c6f139749cd92e61903bce8b3c26 +Subproject commit acc153e8b824284a565519cc33f6704d70c532cc diff --git a/openslides-backend b/openslides-backend index 763d29589e..f6f2a35c8d 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit 763d29589e85a9f34ffa81bdca42367547efc763 +Subproject commit f6f2a35c8d491dd856cc7dd2974fa7764747f9c6 diff --git a/openslides-client b/openslides-client index 78a412a767..d862f9d8d3 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit 78a412a767717b082b6d3f81bcff6657e8930b53 +Subproject commit d862f9d8d37c993084c482a15d7232af510c9071 diff --git a/openslides-datastore-service b/openslides-datastore-service index 9b2ab5ebdf..fe1a610a5d 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit 9b2ab5ebdff1e012507225e83ea690471e4bb03a +Subproject commit fe1a610a5d07b61d72dd69a4dcdc014643f6ac19 diff --git a/openslides-vote-service b/openslides-vote-service index 949e649cd9..3b2850ea39 160000 --- a/openslides-vote-service +++ b/openslides-vote-service @@ -1 +1 @@ -Subproject commit 949e649cd9db744634bb1c4bb75269f0163849b3 +Subproject commit 3b2850ea39fa8a8122b9f5b3d812720355379fdc From 748010f3e7d80d3e2277beb30caa59ecd2a270c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Thu, 15 May 2025 11:23:01 +0200 Subject: [PATCH 08/60] Updated translations (#6920) --- i18n/de.po | 17 ++++++++++------- i18n/template-en.pot | 15 +++++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/i18n/de.po b/i18n/de.po index 0219e91a75..e2910adc59 100644 --- a/i18n/de.po +++ b/i18n/de.po @@ -112,9 +112,6 @@ msgstr "Annehmen" msgid "Access data (PDF)" msgstr "Zugangsdaten (PDF)" -msgid "Access groups" -msgstr "Zugriffsgruppen" - msgid "" "Access only possible for participants of this meeting. All other accounts " "(including organization and committee admins) may not open the closed " @@ -1726,15 +1723,15 @@ msgid "Default visibility for new agenda items (except topics)" msgstr "" "Voreingestellte Sichtbarkeit für neue Tagesordnungspunkte (außer Themen)" -msgid "Default vote method" -msgstr "Voreingestellte Abstimmungsmethode" - msgid "Default vote weight" msgstr "Standard-Stimmgewicht" msgid "Default voting duration" msgstr "Voreingestellte Dauer der Stimmabgabe" +msgid "Default voting method" +msgstr "Voreingestellte Abstimmungsmethode" + msgid "Default voting type" msgstr "Voreingestellte Art der Stimmabgabe" @@ -2023,6 +2020,9 @@ msgstr "Wahl" msgid "Election documents" msgstr "Wahlunterlagen" +msgid "Election method" +msgstr "Wahlmethode" + msgid "Elections" msgstr "Wahlen" @@ -2657,6 +2657,9 @@ msgstr "Bezeichner" msgid "If deactivated it is displayed below the title." msgstr "Wenn deaktiviert erfolgt die Anzeige unterhalb des Antragstitels." +msgid "If empty, everyone can access." +msgstr "Voller Zugriff, wenn keine Gruppe eingetragen." + msgid "" "If it is an amendment, you can back up its content when editing it and " "delete it afterwards." @@ -5577,7 +5580,7 @@ msgid "Voting is currently in progress." msgstr "Stimmabgabe läuft aktuell " msgid "Voting method" -msgstr "Wahlmethode" +msgstr "Abstimmungsmethode" msgid "Voting opened" msgstr "Abstimmung eröffnet" diff --git a/i18n/template-en.pot b/i18n/template-en.pot index e8ee5b0661..18f3c14d05 100644 --- a/i18n/template-en.pot +++ b/i18n/template-en.pot @@ -88,9 +88,6 @@ msgstr "" msgid "Access data (PDF)" msgstr "" -msgid "Access groups" -msgstr "" - msgid "" "Access only possible for participants of this meeting. All other accounts " "(including organization and committee admins) may not open the closed " @@ -1571,15 +1568,15 @@ msgstr "" msgid "Default visibility for new agenda items (except topics)" msgstr "" -msgid "Default vote method" -msgstr "" - msgid "Default vote weight" msgstr "" msgid "Default voting duration" msgstr "" +msgid "Default voting method" +msgstr "" + msgid "Default voting type" msgstr "" @@ -1841,6 +1838,9 @@ msgstr "" msgid "Election documents" msgstr "" +msgid "Election method" +msgstr "" + msgid "Elections" msgstr "" @@ -2431,6 +2431,9 @@ msgstr "" msgid "If deactivated it is displayed below the title." msgstr "" +msgid "If empty, everyone can access." +msgstr "" + msgid "" "If it is an amendment, you can back up its content when editing it and " "delete it afterwards." From 0322c191db4a01648007bbbb33dc05dabef5bf10 Mon Sep 17 00:00:00 2001 From: rrenkert Date: Thu, 15 May 2025 15:38:07 +0200 Subject: [PATCH 09/60] Create patchnotes for 4.2.12 (#6923) --- patchnotes/4.2.12.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 patchnotes/4.2.12.md diff --git a/patchnotes/4.2.12.md b/patchnotes/4.2.12.md new file mode 100644 index 0000000000..02c4386cda --- /dev/null +++ b/patchnotes/4.2.12.md @@ -0,0 +1,8 @@ +## Patchnotes 4.2.12 + +### Optimizations +- Motions > detail view > Forwarding buttons: The ‘Forward’ button is hidden in the application if forwarding is no longer possible. Note: The button in the three-dot menu is only hidden after the motion detail page has been reloaded. This will be revised in an upcoming version. +- Motions > Detail view: Layout of the editor in editorial final version improved +- Layout of drop-down menus improved +- eVoting: linguistic clarifications for voting and voting method selection menus integrated +- Translations added From 13df241d5ba38524713f483ddcf5f098d1db9bbf Mon Sep 17 00:00:00 2001 From: rrenkert Date: Fri, 16 May 2025 09:58:43 +0200 Subject: [PATCH 10/60] Remove milestone from pick-to-staging.yml (#6922) --- .github/workflows/pick-to-staging.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pick-to-staging.yml b/.github/workflows/pick-to-staging.yml index 7191ed4d14..5cdab2b51f 100644 --- a/.github/workflows/pick-to-staging.yml +++ b/.github/workflows/pick-to-staging.yml @@ -63,4 +63,3 @@ jobs: reviewers: ${{ github.event.pull_request.user.login }} assignees: ${{ github.event.pull_request.user.login }} labels: picked-to-staging - milestone: 4 From 60b79e7e6c3c6f12176126577f37d46885d180e4 Mon Sep 17 00:00:00 2001 From: rrenkert Date: Fri, 23 May 2025 12:42:06 +0200 Subject: [PATCH 11/60] Create patchnotes for 4.2.13 (#6925) --- patchnotes/4.2.13.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 patchnotes/4.2.13.md diff --git a/patchnotes/4.2.13.md b/patchnotes/4.2.13.md new file mode 100644 index 0000000000..ea2aaba5e2 --- /dev/null +++ b/patchnotes/4.2.13.md @@ -0,0 +1,3 @@ +## Patchnotes 4.2.13 + +Fix merge artifacts in last stable updates From d89f7ceedc3099724b43170996039598b6a05915 Mon Sep 17 00:00:00 2001 From: Loki Elble <69210919+Elblinator@users.noreply.github.com> Date: Wed, 4 Jun 2025 16:19:33 +0200 Subject: [PATCH 12/60] Updated services (#6928) --- VERSION | 2 +- lib/openslides-go | 2 +- openslides-auth-service | 2 +- openslides-autoupdate-service | 2 +- openslides-backend | 2 +- openslides-client | 2 +- openslides-datastore-service | 2 +- openslides-icc-service | 2 +- openslides-media-service | 2 +- openslides-search-service | 2 +- openslides-vote-service | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/VERSION b/VERSION index adf9931296..1a42702561 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.2.12-dev +4.2.14-dev diff --git a/lib/openslides-go b/lib/openslides-go index 03468a35b4..e9269a9aa4 160000 --- a/lib/openslides-go +++ b/lib/openslides-go @@ -1 +1 @@ -Subproject commit 03468a35b41c21dc0ad0d0b54035e1a43e189d2d +Subproject commit e9269a9aa4d7aae0da8aa4c11f6c9b76abc50b6c diff --git a/openslides-auth-service b/openslides-auth-service index acc153e8b8..4624f12e51 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit acc153e8b824284a565519cc33f6704d70c532cc +Subproject commit 4624f12e518a966205d4d4244daaf8cadabf56e2 diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 7575e34f53..e2631170b6 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 7575e34f53f9f57caa6eda4a388f7ae67ee8cecd +Subproject commit e2631170b69d2da11d5ab8c11c8a6db8c3840975 diff --git a/openslides-backend b/openslides-backend index f6f2a35c8d..8fe81dec38 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit f6f2a35c8d491dd856cc7dd2974fa7764747f9c6 +Subproject commit 8fe81dec38ba6986d9e585ad2a7c61e181ce8fbc diff --git a/openslides-client b/openslides-client index d862f9d8d3..79007ffd64 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit d862f9d8d37c993084c482a15d7232af510c9071 +Subproject commit 79007ffd641e1eeed8680e6c1b748c4033745be0 diff --git a/openslides-datastore-service b/openslides-datastore-service index fe1a610a5d..97defd1c9e 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit fe1a610a5d07b61d72dd69a4dcdc014643f6ac19 +Subproject commit 97defd1c9ede6d0a42a20785c898d1282a15f341 diff --git a/openslides-icc-service b/openslides-icc-service index b5c9013a6a..7c0ced55d4 160000 --- a/openslides-icc-service +++ b/openslides-icc-service @@ -1 +1 @@ -Subproject commit b5c9013a6a58e0b3574f5571f4831ba866c72f06 +Subproject commit 7c0ced55d4bb4c829a807ad86981a81d6377e2e7 diff --git a/openslides-media-service b/openslides-media-service index 00b15d0270..f7d647ae79 160000 --- a/openslides-media-service +++ b/openslides-media-service @@ -1 +1 @@ -Subproject commit 00b15d0270a24e080c34d112f578814b2c00e4ba +Subproject commit f7d647ae79ba7e29d69326051711a95b98fcda89 diff --git a/openslides-search-service b/openslides-search-service index 3e098bce51..8b3adc6c49 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit 3e098bce51c8610615f30730633bef8375aaa669 +Subproject commit 8b3adc6c4955574e5fbac9faebb7a20958d09a98 diff --git a/openslides-vote-service b/openslides-vote-service index 3b2850ea39..78d0f6ec79 160000 --- a/openslides-vote-service +++ b/openslides-vote-service @@ -1 +1 @@ -Subproject commit 3b2850ea39fa8a8122b9f5b3d812720355379fdc +Subproject commit 78d0f6ec79615a4b9489b97f07389b8ff3269f92 From 7bfe81a08294ed6c78de8e0278730aa54c83b905 Mon Sep 17 00:00:00 2001 From: Loki Elble Date: Wed, 4 Jun 2025 16:21:52 +0200 Subject: [PATCH 13/60] Staging update 20250604 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 1a42702561..c0b0f22a1f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.2.14-dev +4.2.14 From fcd3bb4130a968c408a6a8304a3c8db1c293fa2b Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 5 Jun 2025 16:03:03 +0200 Subject: [PATCH 14/60] Almost works? --- dev/actions/build-service/action-run.sh | 2 -- openslides-auth-service | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dev/actions/build-service/action-run.sh b/dev/actions/build-service/action-run.sh index db86c9390d..acbc8a84bd 100644 --- a/dev/actions/build-service/action-run.sh +++ b/dev/actions/build-service/action-run.sh @@ -1,6 +1,4 @@ #!/bin/bash -printenv - chmod +x ${GITHUB_ACTION_PATH}/../../scripts/makefile/build-service.sh ${GITHUB_ACTION_PATH}/../../scripts/makefile/build-service.sh ${SERVICE} ${CONTEXT} ${MODULE} ${PORT} \ No newline at end of file diff --git a/openslides-auth-service b/openslides-auth-service index afb7498a3d..dba9c2b7b7 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit afb7498a3d305108b9707acdc21bd365ebfb9414 +Subproject commit dba9c2b7b750d04d042d0dcf233a865ac24b9bd6 From f51192399be4da69354e2ba7676b3cfcf3181ae6 Mon Sep 17 00:00:00 2001 From: Loki Elble Date: Thu, 5 Jun 2025 16:20:12 +0200 Subject: [PATCH 15/60] Staging update 20250605 --- openslides-client | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides-client b/openslides-client index 79007ffd64..b039297635 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit 79007ffd641e1eeed8680e6c1b748c4033745be0 +Subproject commit b039297635984a4b753e3009a95777de41bd547a From 4174d59a2a10d4faabd4aaf6cbb8e8980e22fe9e Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 5 Jun 2025 16:47:31 +0200 Subject: [PATCH 16/60] Build and Test Action --- .github/workflows/debug-workflow.yml | 2 +- .../build-and-test-service/action-run.sh | 4 ++++ dev/actions/build-and-test-service/action.yml | 19 +++++++++++++++++++ dev/actions/test-submodule/action-run.sh | 5 ----- dev/actions/test-submodule/action.yml | 9 --------- openslides-auth-service | 2 +- 6 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 dev/actions/build-and-test-service/action-run.sh create mode 100644 dev/actions/build-and-test-service/action.yml delete mode 100644 dev/actions/test-submodule/action-run.sh delete mode 100644 dev/actions/test-submodule/action.yml diff --git a/.github/workflows/debug-workflow.yml b/.github/workflows/debug-workflow.yml index 949b0c8673..c83c3b07d2 100644 --- a/.github/workflows/debug-workflow.yml +++ b/.github/workflows/debug-workflow.yml @@ -9,4 +9,4 @@ jobs: - name: Test run: echo "Hey" - name: Test actions - uses: Janmtbehrens/OpenSlides/dev/actions/test-submodule@main \ No newline at end of file + uses: Janmtbehrens/OpenSlides/dev/actions/build-and-test-service@main \ No newline at end of file diff --git a/dev/actions/build-and-test-service/action-run.sh b/dev/actions/build-and-test-service/action-run.sh new file mode 100644 index 0000000000..6dc7f9e95c --- /dev/null +++ b/dev/actions/build-and-test-service/action-run.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +bash dev/run-tests + diff --git a/dev/actions/build-and-test-service/action.yml b/dev/actions/build-and-test-service/action.yml new file mode 100644 index 0000000000..c4f990437a --- /dev/null +++ b/dev/actions/build-and-test-service/action.yml @@ -0,0 +1,19 @@ +name: 'Build and run service tests' +description: 'Build test context image and runs all tests of service.' + +inputs: + service: + description: 'Name of the service. Examples: proxy, auth, datastore' + required: true + +runs: + using: "composite" + steps: + - name: "Build Test" + uses: Janmtbehrens/OpenSlides/dev/actions/build-module@main + with: + service: ${{ inputs.service }} + context: tests + - name: "Test Service" + shell: bash + run: bash $GITHUB_ACTION_PATH/action-run.sh diff --git a/dev/actions/test-submodule/action-run.sh b/dev/actions/test-submodule/action-run.sh deleted file mode 100644 index 4997771322..0000000000 --- a/dev/actions/test-submodule/action-run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "I know my path" -echo $GITHUB_ACTION_PATH - diff --git a/dev/actions/test-submodule/action.yml b/dev/actions/test-submodule/action.yml deleted file mode 100644 index b0f635d39d..0000000000 --- a/dev/actions/test-submodule/action.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: 'Run submodule tests' -description: 'Runs make run-test and supplies all necessary files.' - -runs: - using: "composite" - steps: - - name: "Test Build" - shell: bash - run: bash $GITHUB_ACTION_PATH/action-run.sh diff --git a/openslides-auth-service b/openslides-auth-service index dba9c2b7b7..6edb0bd4f5 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit dba9c2b7b750d04d042d0dcf233a865ac24b9bd6 +Subproject commit 6edb0bd4f59284b234519ed0a5420c587bbdaafd From 50ff8cfdbcc10f1e2529b44fa10c6a6732dad318 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 5 Jun 2025 16:48:12 +0200 Subject: [PATCH 17/60] Test --- .github/workflows/debug-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/debug-workflow.yml b/.github/workflows/debug-workflow.yml index c83c3b07d2..908abff739 100644 --- a/.github/workflows/debug-workflow.yml +++ b/.github/workflows/debug-workflow.yml @@ -9,4 +9,4 @@ jobs: - name: Test run: echo "Hey" - name: Test actions - uses: Janmtbehrens/OpenSlides/dev/actions/build-and-test-service@main \ No newline at end of file + uses: Janmtbehrens/OpenSlides/dev/actions/build-and-test-service@all-in-one \ No newline at end of file From 439b078bead5de02a57327a17f66ce5b9a0eea9f Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 5 Jun 2025 16:49:59 +0200 Subject: [PATCH 18/60] Test #2 --- dev/actions/build-and-test-service/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/actions/build-and-test-service/action.yml b/dev/actions/build-and-test-service/action.yml index c4f990437a..7f7ecd7e0f 100644 --- a/dev/actions/build-and-test-service/action.yml +++ b/dev/actions/build-and-test-service/action.yml @@ -10,7 +10,7 @@ runs: using: "composite" steps: - name: "Build Test" - uses: Janmtbehrens/OpenSlides/dev/actions/build-module@main + uses: Janmtbehrens/OpenSlides/dev/actions/build-module@all-in-one with: service: ${{ inputs.service }} context: tests From f615418e79b2cc9181cd3b533a109e2146e94a48 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 5 Jun 2025 16:50:39 +0200 Subject: [PATCH 19/60] Test #3 --- dev/actions/build-and-test-service/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/actions/build-and-test-service/action.yml b/dev/actions/build-and-test-service/action.yml index 7f7ecd7e0f..d57cebe190 100644 --- a/dev/actions/build-and-test-service/action.yml +++ b/dev/actions/build-and-test-service/action.yml @@ -10,7 +10,7 @@ runs: using: "composite" steps: - name: "Build Test" - uses: Janmtbehrens/OpenSlides/dev/actions/build-module@all-in-one + uses: Janmtbehrens/OpenSlides/dev/actions/build-service@all-in-one with: service: ${{ inputs.service }} context: tests From 82c291083c1aae5e6a29a6d268376b4cca818293 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 5 Jun 2025 16:53:52 +0200 Subject: [PATCH 20/60] Auth Test --- .github/workflows/debug-workflow.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/debug-workflow.yml b/.github/workflows/debug-workflow.yml index 908abff739..c417876d5d 100644 --- a/.github/workflows/debug-workflow.yml +++ b/.github/workflows/debug-workflow.yml @@ -6,7 +6,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Test - run: echo "Hey" - name: Test actions - uses: Janmtbehrens/OpenSlides/dev/actions/build-and-test-service@all-in-one \ No newline at end of file + uses: Janmtbehrens/OpenSlides/dev/actions/build-and-test-service@all-in-one + with: + service: auth \ No newline at end of file From 64dbfac73b65fde0b667e8743ee46d9b92634da5 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Tue, 10 Jun 2025 09:26:39 +0200 Subject: [PATCH 21/60] Merged all Submodules --- .github/workflows/debug-workflow.yml | 2 +- dev/scripts/git-fetch-and-merge-upstream.sh | 40 +++++++++++++++++++++ openslides-autoupdate-service | 2 +- openslides-backend | 2 +- openslides-client | 2 +- openslides-datastore-service | 2 +- openslides-icc-service | 2 +- openslides-media-service | 2 +- openslides-search-service | 2 +- openslides-vote-service | 2 +- 10 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 dev/scripts/git-fetch-and-merge-upstream.sh diff --git a/.github/workflows/debug-workflow.yml b/.github/workflows/debug-workflow.yml index c417876d5d..63d61530a8 100644 --- a/.github/workflows/debug-workflow.yml +++ b/.github/workflows/debug-workflow.yml @@ -1,4 +1,4 @@ -on: push +on: deployment jobs: test-job: diff --git a/dev/scripts/git-fetch-and-merge-upstream.sh b/dev/scripts/git-fetch-and-merge-upstream.sh new file mode 100644 index 0000000000..7e6dd70fa8 --- /dev/null +++ b/dev/scripts/git-fetch-and-merge-upstream.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Import OpenSlides utils package +. $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/util.sh + +# Commits and pushes all submodules to their respective repositories. +# The same Commit Message is reused for all Commits +# Use this for blanket changes to all submodules that are the same between all submodules, such as +# Dockerfile changes that need to be applied to all submodules + +export OVERWRITE_MESSAGE=$1 +export MESSAGE="Merge Upstream" +if [ ! -z "${OVERWRITE_MESSAGE}" ]; then + export MESSAGE=$OVERWRITE_MESSAGE +fi + +export SINGLE_TARGET=$2 + +IFS=$'\n' +for DIR in $(git submodule foreach --recursive -q sh -c pwd); do + # Extract submodule name + cd "$DIR" && \ + export DIRNAME=${PWD##*/} && \ + export SUBMODULE=${DIRNAME//"openslides-"} && \ + + if [ $SUBMODULE == 'go' ]; then continue; fi && \ + if [ $SUBMODULE == 'meta' ]; then continue; fi && \ + + # Check for single target + if [ $# -eq 2 ]; then if [[ $SINGLE_TARGET != $SUBMODULE ]]; then continue; fi; fi && \ + + # Git commit + info "Fetch & merge for ${SUBMODULE} " && \ + git fetch upstream && \ + export error=0 && \ + git merge upstream/main || export error=1 && \ + if [ $error -eq 1 ]; then (git commit && git push) ; fi && \ + if [ $error -eq 0 ]; then (git push) ; fi +done +wait \ No newline at end of file diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 94135bf182..2e8b2bd228 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 94135bf1821b6de8d4c2541e3701394c10045c97 +Subproject commit 2e8b2bd228898d98e2a3b4acfe9c7a4001dc3190 diff --git a/openslides-backend b/openslides-backend index 866b89378f..212a72cb1f 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit 866b89378f052eeef84db58f371a7f31c513d61c +Subproject commit 212a72cb1f6aaa2a50c7276ba155b3e7856ab404 diff --git a/openslides-client b/openslides-client index 61ce4217f5..62ecfe2a84 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit 61ce4217f5351e1451e464ebc3a417dd94703d05 +Subproject commit 62ecfe2a8463be449dac2f02b1b1653f6afaa1a1 diff --git a/openslides-datastore-service b/openslides-datastore-service index 749429e1cd..868ac74f42 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit 749429e1cd742c7884e5f56d88704274a9f83332 +Subproject commit 868ac74f42aac45a91dcc213532f9c55ba2a7fee diff --git a/openslides-icc-service b/openslides-icc-service index 0b9c6d5b13..5fea936866 160000 --- a/openslides-icc-service +++ b/openslides-icc-service @@ -1 +1 @@ -Subproject commit 0b9c6d5b13286d81f2c19a5802259be981bd3a21 +Subproject commit 5fea9368668523ea210b2389dc40a9e1a44b3d16 diff --git a/openslides-media-service b/openslides-media-service index 296057104e..64ef196578 160000 --- a/openslides-media-service +++ b/openslides-media-service @@ -1 +1 @@ -Subproject commit 296057104e1892d87f4cdb5d5478eacd721f745f +Subproject commit 64ef196578caaadd2aba3f6490ef9df92a736b11 diff --git a/openslides-search-service b/openslides-search-service index 35dbc4cd9a..e321d2a8a9 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit 35dbc4cd9aa21608ffd97f4fb20b01e07f270b3f +Subproject commit e321d2a8a919152020077dbf1c631352d12f868a diff --git a/openslides-vote-service b/openslides-vote-service index 448d52a24f..2ae3dc9ba8 160000 --- a/openslides-vote-service +++ b/openslides-vote-service @@ -1 +1 @@ -Subproject commit 448d52a24f6d34958cd26ece11e544dce1d7bbc9 +Subproject commit 2ae3dc9ba8f8ae6e20a8faa95ab36d0f8bf2f403 From cc1117ceaa5afb4bf0b39fd46bca6d6f9cfd38d8 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Tue, 10 Jun 2025 15:29:09 +0200 Subject: [PATCH 22/60] Fixed production image names and various bugs --- Makefile | 2 +- dev/scripts/git-fetch-and-merge-upstream.sh | 13 ++----------- dev/scripts/makefile/build-all-submodules.sh | 2 +- dev/scripts/makefile/build-service.sh | 6 +++--- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 256729a55f..5540dd9c6d 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ run-dev-otel: | build-dev build-dev: sed -i "1s/.*/$(GO_VERSION)/" $(DOCKER_PATH)/workspaces/*.work chmod +x $(SCRIPT_PATH)/makefile/build-all-submodules.sh - $(SCRIPT_PATH)/makefile/build-all-submodules.sh + $(SCRIPT_PATH)/makefile/build-all-submodules.sh dev # Run the tests of all services run-service-tests: diff --git a/dev/scripts/git-fetch-and-merge-upstream.sh b/dev/scripts/git-fetch-and-merge-upstream.sh index 7e6dd70fa8..bf2fed9f04 100644 --- a/dev/scripts/git-fetch-and-merge-upstream.sh +++ b/dev/scripts/git-fetch-and-merge-upstream.sh @@ -3,18 +3,9 @@ # Import OpenSlides utils package . $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/util.sh -# Commits and pushes all submodules to their respective repositories. -# The same Commit Message is reused for all Commits -# Use this for blanket changes to all submodules that are the same between all submodules, such as -# Dockerfile changes that need to be applied to all submodules +# Fetches and merges all submodules with their respective upstream/main repositories. -export OVERWRITE_MESSAGE=$1 -export MESSAGE="Merge Upstream" -if [ ! -z "${OVERWRITE_MESSAGE}" ]; then - export MESSAGE=$OVERWRITE_MESSAGE -fi - -export SINGLE_TARGET=$2 +export SINGLE_TARGET=$1 IFS=$'\n' for DIR in $(git submodule foreach --recursive -q sh -c pwd); do diff --git a/dev/scripts/makefile/build-all-submodules.sh b/dev/scripts/makefile/build-all-submodules.sh index d1aeb94b88..eba144e9cd 100755 --- a/dev/scripts/makefile/build-all-submodules.sh +++ b/dev/scripts/makefile/build-all-submodules.sh @@ -32,6 +32,6 @@ for DIR in $(git submodule foreach --recursive -q sh -c pwd); do # Execute test info " --- Building service ${SUBMODULE} for context ${CONTEXT} --- " && \ - echocmd eval "make build-dev" + echocmd eval "make build-${CONTEXT}" done wait \ No newline at end of file diff --git a/dev/scripts/makefile/build-service.sh b/dev/scripts/makefile/build-service.sh index cb288d1718..da190dfccc 100644 --- a/dev/scripts/makefile/build-service.sh +++ b/dev/scripts/makefile/build-service.sh @@ -20,15 +20,15 @@ if [ "${CONTEXT}" != "prod" -a "${CONTEXT}" != "dev" -a "${CONTEXT}" != "tests" exit 1; \ fi -export TAG=openslides-${SERVICE}- +export TAG=openslides-${SERVICE} export OPT_ARGS= if [ -n "${MODULE}" ]; then - export TAG=${TAG}${MODULE}- + export TAG=${TAG}-${MODULE} export OPT_ARGS="--build-arg MODULE=${MODULE} --build-arg PORT=${PORT}" fi -export TAG=${TAG}${CONTEXT} +if [ "${CONTEXT}" != "prod" ]; then export TAG="${TAG}-${CONTEXT}"; fi info "Building submodule '${SERVICE}' for ${CONTEXT} context" From 3d1ab6fbcd1e7bc3c1ff78af10b043b59fd3083f Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Tue, 10 Jun 2025 16:04:49 +0200 Subject: [PATCH 23/60] Small test action fix --- dev/actions/build-and-test-service/action-run.sh | 2 +- openslides-auth-service | 2 +- openslides-backend | 2 +- openslides-media-service | 2 +- openslides-proxy | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/actions/build-and-test-service/action-run.sh b/dev/actions/build-and-test-service/action-run.sh index 6dc7f9e95c..d586db646a 100644 --- a/dev/actions/build-and-test-service/action-run.sh +++ b/dev/actions/build-and-test-service/action-run.sh @@ -1,4 +1,4 @@ #!/bin/bash -bash dev/run-tests +bash dev/run-tests.sh diff --git a/openslides-auth-service b/openslides-auth-service index 6edb0bd4f5..bac04be66e 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit 6edb0bd4f59284b234519ed0a5420c587bbdaafd +Subproject commit bac04be66e544917b6edaa00f2601aa3e6d91423 diff --git a/openslides-backend b/openslides-backend index 212a72cb1f..293f7fa160 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit 212a72cb1f6aaa2a50c7276ba155b3e7856ab404 +Subproject commit 293f7fa1609e7dc52deb87b114510513fb033e55 diff --git a/openslides-media-service b/openslides-media-service index 64ef196578..f46c4a9bbd 160000 --- a/openslides-media-service +++ b/openslides-media-service @@ -1 +1 @@ -Subproject commit 64ef196578caaadd2aba3f6490ef9df92a736b11 +Subproject commit f46c4a9bbd974946ce0309ca86e31bac8dbe9a94 diff --git a/openslides-proxy b/openslides-proxy index 0a9514cedf..b11de7f5ee 160000 --- a/openslides-proxy +++ b/openslides-proxy @@ -1 +1 @@ -Subproject commit 0a9514cedfde1676f6c67b1e6d27ac5c6ea0a194 +Subproject commit b11de7f5eea559cb862f3b4f32fa6c33090a0004 From 3c62d932e8448d71a7c8b76dd419615b4433ad28 Mon Sep 17 00:00:00 2001 From: Loki Elble Date: Tue, 10 Jun 2025 16:08:02 +0200 Subject: [PATCH 24/60] Staging update 20250610 --- openslides-autoupdate-service | 2 +- openslides-backend | 2 +- openslides-client | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index e2631170b6..c6c47de7aa 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit e2631170b69d2da11d5ab8c11c8a6db8c3840975 +Subproject commit c6c47de7aafd7dd5b8da59e3c1654fbec397759c diff --git a/openslides-backend b/openslides-backend index 8fe81dec38..9a3e8d4fbc 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit 8fe81dec38ba6986d9e585ad2a7c61e181ce8fbc +Subproject commit 9a3e8d4fbcf3878b404ac8d4eaefb4459f372720 diff --git a/openslides-client b/openslides-client index b039297635..e9f9b5b16c 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit b039297635984a4b753e3009a95777de41bd547a +Subproject commit e9f9b5b16c57503dc43c1aaf52a8d8659c043656 From cfd8a0a086c5fd4b6ccca3054449ace2b6bb9957 Mon Sep 17 00:00:00 2001 From: Loki Elble Date: Wed, 11 Jun 2025 16:03:38 +0200 Subject: [PATCH 25/60] Staging update 20250611 --- openslides-client | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides-client b/openslides-client index e9f9b5b16c..1ca35f5bb2 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit e9f9b5b16c57503dc43c1aaf52a8d8659c043656 +Subproject commit 1ca35f5bb215f0642001455c34cee08fe8ca8c69 From 359d72ccd35798f817fd3ffddcaa536cf44ac1c9 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 12 Jun 2025 09:51:58 +0200 Subject: [PATCH 26/60] Adjust Workflows --- openslides-auth-service | 2 +- openslides-autoupdate-service | 2 +- openslides-backend | 2 +- openslides-client | 2 +- openslides-datastore-service | 2 +- openslides-icc-service | 2 +- openslides-manage-service | 2 +- openslides-media-service | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openslides-auth-service b/openslides-auth-service index bac04be66e..d9b2d0dbbd 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit bac04be66e544917b6edaa00f2601aa3e6d91423 +Subproject commit d9b2d0dbbdded4ec19afc00a444bcbe9db63ecc8 diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 2e8b2bd228..2f10aa3e56 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 2e8b2bd228898d98e2a3b4acfe9c7a4001dc3190 +Subproject commit 2f10aa3e5622eb183091d50a9aac0c93d7873c3d diff --git a/openslides-backend b/openslides-backend index 293f7fa160..5c4b0c816f 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit 293f7fa1609e7dc52deb87b114510513fb033e55 +Subproject commit 5c4b0c816f0e6c8d4e4f762004a4be502869b2fa diff --git a/openslides-client b/openslides-client index 62ecfe2a84..29f02b0311 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit 62ecfe2a8463be449dac2f02b1b1653f6afaa1a1 +Subproject commit 29f02b0311f0a57edc4007c066156d842c3583e5 diff --git a/openslides-datastore-service b/openslides-datastore-service index 868ac74f42..15bcef349f 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit 868ac74f42aac45a91dcc213532f9c55ba2a7fee +Subproject commit 15bcef349f38958dea4c64fcd84eb149e94441d8 diff --git a/openslides-icc-service b/openslides-icc-service index 5fea936866..3760141a6a 160000 --- a/openslides-icc-service +++ b/openslides-icc-service @@ -1 +1 @@ -Subproject commit 5fea9368668523ea210b2389dc40a9e1a44b3d16 +Subproject commit 3760141a6ab5a5199920c37771fb717857066cb8 diff --git a/openslides-manage-service b/openslides-manage-service index 40062fca20..a014474d0a 160000 --- a/openslides-manage-service +++ b/openslides-manage-service @@ -1 +1 @@ -Subproject commit 40062fca20651939174d71b0e68c9be50e3fabee +Subproject commit a014474d0a057e37d06538f44955d64bd62f2f6b diff --git a/openslides-media-service b/openslides-media-service index f46c4a9bbd..e481108763 160000 --- a/openslides-media-service +++ b/openslides-media-service @@ -1 +1 @@ -Subproject commit f46c4a9bbd974946ce0309ca86e31bac8dbe9a94 +Subproject commit e4811087639ecb8cfe19e74142888657b34e217c From 48e3aae5ea3553b0e8aef9b47c1c76f571a885b4 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 12 Jun 2025 14:29:11 +0200 Subject: [PATCH 27/60] Adjust Workflows #3 --- openslides-auth-service | 2 +- openslides-autoupdate-service | 2 +- openslides-backend | 2 +- openslides-client | 2 +- openslides-datastore-service | 2 +- openslides-manage-service | 2 +- openslides-media-service | 2 +- openslides-search-service | 2 +- openslides-vote-service | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/openslides-auth-service b/openslides-auth-service index d9b2d0dbbd..72a50587bd 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit d9b2d0dbbdded4ec19afc00a444bcbe9db63ecc8 +Subproject commit 72a50587bdd6921f4556ebb1ec8bf3d0bc9e215b diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 2f10aa3e56..f4b79867a1 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 2f10aa3e5622eb183091d50a9aac0c93d7873c3d +Subproject commit f4b79867a1b20a4037cc4855acd546481ba5b096 diff --git a/openslides-backend b/openslides-backend index 5c4b0c816f..e146d6978a 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit 5c4b0c816f0e6c8d4e4f762004a4be502869b2fa +Subproject commit e146d6978a45b5637bd14afc41412e430db9b292 diff --git a/openslides-client b/openslides-client index 29f02b0311..c42e34eb56 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit 29f02b0311f0a57edc4007c066156d842c3583e5 +Subproject commit c42e34eb563696e5481a2af8b350e5e0b752d314 diff --git a/openslides-datastore-service b/openslides-datastore-service index 15bcef349f..7d8b1862cd 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit 15bcef349f38958dea4c64fcd84eb149e94441d8 +Subproject commit 7d8b1862cd7077e151c1eedb177948577df621d0 diff --git a/openslides-manage-service b/openslides-manage-service index a014474d0a..641524715c 160000 --- a/openslides-manage-service +++ b/openslides-manage-service @@ -1 +1 @@ -Subproject commit a014474d0a057e37d06538f44955d64bd62f2f6b +Subproject commit 641524715c48e34ef0e516cd98e25abe9ff223bf diff --git a/openslides-media-service b/openslides-media-service index e481108763..2633308bb4 160000 --- a/openslides-media-service +++ b/openslides-media-service @@ -1 +1 @@ -Subproject commit e4811087639ecb8cfe19e74142888657b34e217c +Subproject commit 2633308bb4171530f40d38b455cb7d0ee7be21e2 diff --git a/openslides-search-service b/openslides-search-service index e321d2a8a9..722ed1b96f 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit e321d2a8a919152020077dbf1c631352d12f868a +Subproject commit 722ed1b96f07205198f19828ddfef2b4b6ea5506 diff --git a/openslides-vote-service b/openslides-vote-service index 2ae3dc9ba8..6e27f2c1e6 160000 --- a/openslides-vote-service +++ b/openslides-vote-service @@ -1 +1 @@ -Subproject commit 2ae3dc9ba8f8ae6e20a8faa95ab36d0f8bf2f403 +Subproject commit 6e27f2c1e6e9efebc57559f4b486e00f9cb3b1c4 From 66709737c9598bd4c398eea1673fdbde92b22b9b Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 12 Jun 2025 17:14:50 +0200 Subject: [PATCH 28/60] Fetch script update --- dev/scripts/git-fetch-and-merge-upstream.sh | 4 +++- openslides-datastore-service | 2 +- openslides-media-service | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dev/scripts/git-fetch-and-merge-upstream.sh b/dev/scripts/git-fetch-and-merge-upstream.sh index bf2fed9f04..4faf29479b 100644 --- a/dev/scripts/git-fetch-and-merge-upstream.sh +++ b/dev/scripts/git-fetch-and-merge-upstream.sh @@ -22,7 +22,9 @@ for DIR in $(git submodule foreach --recursive -q sh -c pwd); do # Git commit info "Fetch & merge for ${SUBMODULE} " && \ - git fetch upstream && \ + export GIT_UPDATE=$(git remote update upstream) && \ + export GIT_FETCH=$(git fetch upstream) && \ + if [ -z $GIT_FETCH ]; then echo "Nothing new to fetch and merge" && continue; fi &&\ export error=0 && \ git merge upstream/main || export error=1 && \ if [ $error -eq 1 ]; then (git commit && git push) ; fi && \ diff --git a/openslides-datastore-service b/openslides-datastore-service index 7d8b1862cd..b00529c469 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit 7d8b1862cd7077e151c1eedb177948577df621d0 +Subproject commit b00529c46964b442a12cfdc99161ddcda65afcff diff --git a/openslides-media-service b/openslides-media-service index 2633308bb4..eeb6ad5ad9 160000 --- a/openslides-media-service +++ b/openslides-media-service @@ -1 +1 @@ -Subproject commit 2633308bb4171530f40d38b455cb7d0ee7be21e2 +Subproject commit eeb6ad5ad9ad75ebc6af1e5fcc8281ee6a295be7 From be17c55973f6492ec610be426e9392a5769a92cd Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 12 Jun 2025 17:36:05 +0200 Subject: [PATCH 29/60] Bump --- openslides-datastore-service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides-datastore-service b/openslides-datastore-service index b00529c469..0d4b710914 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit b00529c46964b442a12cfdc99161ddcda65afcff +Subproject commit 0d4b7109147c00fc6e7d18f727191859c424741d From 74cb740c66d6a6f03e3f8500e1b977724d835d98 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Mon, 16 Jun 2025 13:37:44 +0200 Subject: [PATCH 30/60] Remove command.sh from some Go Services --- openslides-autoupdate-service | 2 +- openslides-backend | 2 +- openslides-datastore-service | 2 +- openslides-icc-service | 2 +- openslides-manage-service | 2 +- openslides-search-service | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index f4b79867a1..8890226f28 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit f4b79867a1b20a4037cc4855acd546481ba5b096 +Subproject commit 8890226f28dd5fd423a8b8871f381995f89ca32d diff --git a/openslides-backend b/openslides-backend index e146d6978a..a1476ce773 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit e146d6978a45b5637bd14afc41412e430db9b292 +Subproject commit a1476ce773227aabd58b21232f2bcd03d8239ffd diff --git a/openslides-datastore-service b/openslides-datastore-service index 0d4b710914..32402d2229 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit 0d4b7109147c00fc6e7d18f727191859c424741d +Subproject commit 32402d222952fefaefa61bfd6428487d727f79b8 diff --git a/openslides-icc-service b/openslides-icc-service index 3760141a6a..24dac04a70 160000 --- a/openslides-icc-service +++ b/openslides-icc-service @@ -1 +1 @@ -Subproject commit 3760141a6ab5a5199920c37771fb717857066cb8 +Subproject commit 24dac04a70716cd2a4c1e4140f90ee823887e0ec diff --git a/openslides-manage-service b/openslides-manage-service index 641524715c..7606296733 160000 --- a/openslides-manage-service +++ b/openslides-manage-service @@ -1 +1 @@ -Subproject commit 641524715c48e34ef0e516cd98e25abe9ff223bf +Subproject commit 7606296733fa677aab94074bc0c97c5468650b21 diff --git a/openslides-search-service b/openslides-search-service index 722ed1b96f..5d52f3fe89 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit 722ed1b96f07205198f19828ddfef2b4b6ea5506 +Subproject commit 5d52f3fe8924608febcf9cfe78e41b14b7c58a12 From fb21a0ce8374a7d92175c9ead1e8085af28283ee Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Mon, 16 Jun 2025 13:52:42 +0200 Subject: [PATCH 31/60] Some more command.sh changes --- openslides-autoupdate-service | 2 +- openslides-icc-service | 2 +- openslides-search-service | 2 +- openslides-vote-service | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 8890226f28..d7412e6d5d 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 8890226f28dd5fd423a8b8871f381995f89ca32d +Subproject commit d7412e6d5d57bf969d3fb3e43362d23834f092a8 diff --git a/openslides-icc-service b/openslides-icc-service index 24dac04a70..a790909b48 160000 --- a/openslides-icc-service +++ b/openslides-icc-service @@ -1 +1 @@ -Subproject commit 24dac04a70716cd2a4c1e4140f90ee823887e0ec +Subproject commit a790909b4870b5a7839e3bef6595b5e2aa0d27fe diff --git a/openslides-search-service b/openslides-search-service index 5d52f3fe89..bf2a806da8 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit 5d52f3fe8924608febcf9cfe78e41b14b7c58a12 +Subproject commit bf2a806da8d1f7137ad7fc6c4cd0e48e2b6140fd diff --git a/openslides-vote-service b/openslides-vote-service index 6e27f2c1e6..a59e0b260c 160000 --- a/openslides-vote-service +++ b/openslides-vote-service @@ -1 +1 @@ -Subproject commit 6e27f2c1e6e9efebc57559f4b486e00f9cb3b1c4 +Subproject commit a59e0b260c014aebed1787cfc475c1d6936329c1 From 430c02ec01e8fd996bf29175c62c9c29bd168f5c Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Mon, 16 Jun 2025 13:53:28 +0200 Subject: [PATCH 32/60] Dockerfile.Dev Workaround --- openslides-auth-service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides-auth-service b/openslides-auth-service index 72a50587bd..a626121ba0 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit 72a50587bdd6921f4556ebb1ec8bf3d0bc9e215b +Subproject commit a626121ba0db40c5856ac457f9d05c685d5b29b2 From f7c9bd6b9863a7ddc57b2d62c1e510a2e4221cc3 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Mon, 16 Jun 2025 13:56:11 +0200 Subject: [PATCH 33/60] Merge with upstream --- dev/scripts/git-fetch-and-merge-upstream.sh | 1 - openslides-auth-service | 2 +- openslides-client | 2 +- openslides-datastore-service | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dev/scripts/git-fetch-and-merge-upstream.sh b/dev/scripts/git-fetch-and-merge-upstream.sh index 4faf29479b..9360df1e09 100644 --- a/dev/scripts/git-fetch-and-merge-upstream.sh +++ b/dev/scripts/git-fetch-and-merge-upstream.sh @@ -24,7 +24,6 @@ for DIR in $(git submodule foreach --recursive -q sh -c pwd); do info "Fetch & merge for ${SUBMODULE} " && \ export GIT_UPDATE=$(git remote update upstream) && \ export GIT_FETCH=$(git fetch upstream) && \ - if [ -z $GIT_FETCH ]; then echo "Nothing new to fetch and merge" && continue; fi &&\ export error=0 && \ git merge upstream/main || export error=1 && \ if [ $error -eq 1 ]; then (git commit && git push) ; fi && \ diff --git a/openslides-auth-service b/openslides-auth-service index a626121ba0..d6b6b38889 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit a626121ba0db40c5856ac457f9d05c685d5b29b2 +Subproject commit d6b6b388897e73fd96cc6671c20c904920d909d5 diff --git a/openslides-client b/openslides-client index c42e34eb56..2f0feb510d 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit c42e34eb563696e5481a2af8b350e5e0b752d314 +Subproject commit 2f0feb510dbf4e6b5082969875dfd64b5ce962a7 diff --git a/openslides-datastore-service b/openslides-datastore-service index 32402d2229..a2cc35b35f 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit 32402d222952fefaefa61bfd6428487d727f79b8 +Subproject commit a2cc35b35f79d597a02439825259702c9ad36c45 From ef8e3eb2c03b1c1ccb54b0c1b03c4ec37c44e2d2 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Mon, 16 Jun 2025 15:15:38 +0200 Subject: [PATCH 34/60] Removing old Dockerfiles --- openslides-backend | 2 +- openslides-client | 2 +- openslides-datastore-service | 2 +- openslides-manage-service | 2 +- openslides-vote-service | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openslides-backend b/openslides-backend index a1476ce773..e414eed98a 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit a1476ce773227aabd58b21232f2bcd03d8239ffd +Subproject commit e414eed98a2602b826ab74447a122096e879b4ca diff --git a/openslides-client b/openslides-client index 2f0feb510d..036205e413 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit 2f0feb510dbf4e6b5082969875dfd64b5ce962a7 +Subproject commit 036205e4130b4bb73c15643631769ca9fc830029 diff --git a/openslides-datastore-service b/openslides-datastore-service index a2cc35b35f..df3b578892 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit a2cc35b35f79d597a02439825259702c9ad36c45 +Subproject commit df3b578892207611b806ec531097959a8ecca75c diff --git a/openslides-manage-service b/openslides-manage-service index 7606296733..14d58f2e3b 160000 --- a/openslides-manage-service +++ b/openslides-manage-service @@ -1 +1 @@ -Subproject commit 7606296733fa677aab94074bc0c97c5468650b21 +Subproject commit 14d58f2e3bcd67145a148b6d3a2270b7697d8c87 diff --git a/openslides-vote-service b/openslides-vote-service index a59e0b260c..2a40cf8b40 160000 --- a/openslides-vote-service +++ b/openslides-vote-service @@ -1 +1 @@ -Subproject commit a59e0b260c014aebed1787cfc475c1d6936329c1 +Subproject commit 2a40cf8b40547ca892c95d84c6b423ad1811e508 From 12e9b9136736ee42efbd4e989ff9c7465aaf90aa Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Mon, 16 Jun 2025 15:44:01 +0200 Subject: [PATCH 35/60] Merge with upstream --- openslides-client | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides-client b/openslides-client index 036205e413..b6cabc4277 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit 036205e4130b4bb73c15643631769ca9fc830029 +Subproject commit b6cabc4277341b1347f0acae84d53a411b37e641 From 2192974eea6150ea468c31f9b6c7c1909ae6287a Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Mon, 16 Jun 2025 15:53:21 +0200 Subject: [PATCH 36/60] Go Update --- lib/openslides-go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/openslides-go b/lib/openslides-go index 8aac50248e..e9269a9aa4 160000 --- a/lib/openslides-go +++ b/lib/openslides-go @@ -1 +1 @@ -Subproject commit 8aac50248ebfa6bdd37d25590d87f6095adfb012 +Subproject commit e9269a9aa4d7aae0da8aa4c11f6c9b76abc50b6c From 5d2610dc54df80dc008780c8f50e24ea15afe7c3 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Tue, 17 Jun 2025 11:25:45 +0200 Subject: [PATCH 37/60] Merge with main & Workflow check --- dev/scripts/git-fetch-and-merge-upstream.sh | 37 +++++++++++++++++---- openslides-auth-service | 2 +- openslides-backend | 2 +- openslides-client | 2 +- openslides-search-service | 2 +- 5 files changed, 34 insertions(+), 11 deletions(-) diff --git a/dev/scripts/git-fetch-and-merge-upstream.sh b/dev/scripts/git-fetch-and-merge-upstream.sh index 9360df1e09..c04fbf0ad8 100644 --- a/dev/scripts/git-fetch-and-merge-upstream.sh +++ b/dev/scripts/git-fetch-and-merge-upstream.sh @@ -7,6 +7,32 @@ export SINGLE_TARGET=$1 +fetch_merge_push() { + export SUBMODULE=$1 + export SOURCE=$2 + + info "Fetch & merge for ${SUBMODULE} " + export GIT_UPDATE=$(git remote update $SOURCE) + export GIT_FETCH=$(git fetch $SOURCE) + export ERROR=0 && \ + git merge $SOURCE/main || export ERROR=1 + + if [ $SOURCE == 'origin' ]; then return; fi + + if [ $ERROR == 1 ]; then (git commit && git push) ; fi + if [ $ERROR == 0 ]; then (git push) ; fi +} + +update_meta(){ + if [ -d "meta" ] + then + cd meta + (fetch_merge_push meta origin) + cd .. + fi +} + + IFS=$'\n' for DIR in $(git submodule foreach --recursive -q sh -c pwd); do # Extract submodule name @@ -20,13 +46,10 @@ for DIR in $(git submodule foreach --recursive -q sh -c pwd); do # Check for single target if [ $# -eq 2 ]; then if [[ $SINGLE_TARGET != $SUBMODULE ]]; then continue; fi; fi && \ + # Recursively Update Meta too + update_meta && \ + # Git commit - info "Fetch & merge for ${SUBMODULE} " && \ - export GIT_UPDATE=$(git remote update upstream) && \ - export GIT_FETCH=$(git fetch upstream) && \ - export error=0 && \ - git merge upstream/main || export error=1 && \ - if [ $error -eq 1 ]; then (git commit && git push) ; fi && \ - if [ $error -eq 0 ]; then (git push) ; fi + fetch_merge_push ${SUBMODULE} upstream done wait \ No newline at end of file diff --git a/openslides-auth-service b/openslides-auth-service index d6b6b38889..285098a2c4 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit d6b6b388897e73fd96cc6671c20c904920d909d5 +Subproject commit 285098a2c4bbec47a4f027ccc44585df12536cd8 diff --git a/openslides-backend b/openslides-backend index e414eed98a..bea34ca4f7 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit e414eed98a2602b826ab74447a122096e879b4ca +Subproject commit bea34ca4f72a8502c865fe7255ff61cabdcd65ea diff --git a/openslides-client b/openslides-client index b6cabc4277..a031d1d53d 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit b6cabc4277341b1347f0acae84d53a411b37e641 +Subproject commit a031d1d53d18891967d1b5fda5bae37d2fde9b3f diff --git a/openslides-search-service b/openslides-search-service index bf2a806da8..399201eaf6 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit bf2a806da8d1f7137ad7fc6c4cd0e48e2b6140fd +Subproject commit 399201eaf6ef1031af28df4dadb34ec3b1df9682 From c98c57cc6a81e6d943b0fc09cb666bcd7cd389b7 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Tue, 17 Jun 2025 11:43:03 +0200 Subject: [PATCH 38/60] Final changes --- openslides-backend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides-backend b/openslides-backend index bea34ca4f7..5ceb38b8e3 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit bea34ca4f72a8502c865fe7255ff61cabdcd65ea +Subproject commit 5ceb38b8e383b4b2c4872a9131f216d72502f925 From 4986664b9d89424a6c0329f4fca16b7ba920e1d7 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Tue, 17 Jun 2025 12:40:01 +0200 Subject: [PATCH 39/60] Create unified and standardized continuous integration workflow for each service --- openslides-auth-service | 2 +- openslides-autoupdate-service | 2 +- openslides-backend | 2 +- openslides-client | 2 +- openslides-datastore-service | 2 +- openslides-icc-service | 2 +- openslides-manage-service | 2 +- openslides-media-service | 2 +- openslides-search-service | 2 +- openslides-vote-service | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/openslides-auth-service b/openslides-auth-service index 285098a2c4..a4f92109d8 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit 285098a2c4bbec47a4f027ccc44585df12536cd8 +Subproject commit a4f92109d89162a82471e228f9e6b5c7c8bbd456 diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index d7412e6d5d..89eaddb08d 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit d7412e6d5d57bf969d3fb3e43362d23834f092a8 +Subproject commit 89eaddb08de47a543c3a3af0bdf088728825af1c diff --git a/openslides-backend b/openslides-backend index 5ceb38b8e3..7d3bd3ad3b 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit 5ceb38b8e383b4b2c4872a9131f216d72502f925 +Subproject commit 7d3bd3ad3b52c3f6faed481162b777632cb1961d diff --git a/openslides-client b/openslides-client index a031d1d53d..a1a70d0717 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit a031d1d53d18891967d1b5fda5bae37d2fde9b3f +Subproject commit a1a70d0717961f00391fe5db9e90a8200974a7c7 diff --git a/openslides-datastore-service b/openslides-datastore-service index df3b578892..84b907c1f0 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit df3b578892207611b806ec531097959a8ecca75c +Subproject commit 84b907c1f0a6a8baa735683bb838cdf0094039df diff --git a/openslides-icc-service b/openslides-icc-service index a790909b48..7f534dfdc3 160000 --- a/openslides-icc-service +++ b/openslides-icc-service @@ -1 +1 @@ -Subproject commit a790909b4870b5a7839e3bef6595b5e2aa0d27fe +Subproject commit 7f534dfdc351b29fc31c356626483b5c66ccac15 diff --git a/openslides-manage-service b/openslides-manage-service index 14d58f2e3b..6d1b0eac48 160000 --- a/openslides-manage-service +++ b/openslides-manage-service @@ -1 +1 @@ -Subproject commit 14d58f2e3bcd67145a148b6d3a2270b7697d8c87 +Subproject commit 6d1b0eac4873cce21149602d66f2b92f4d4c3200 diff --git a/openslides-media-service b/openslides-media-service index eeb6ad5ad9..410baa5129 160000 --- a/openslides-media-service +++ b/openslides-media-service @@ -1 +1 @@ -Subproject commit eeb6ad5ad9ad75ebc6af1e5fcc8281ee6a295be7 +Subproject commit 410baa51293dcc9f3ffe8a3ecbe11f2d4a01c282 diff --git a/openslides-search-service b/openslides-search-service index 399201eaf6..4bf6c8ad07 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit 399201eaf6ef1031af28df4dadb34ec3b1df9682 +Subproject commit 4bf6c8ad07fe01b356eca1d5a9b215e664b0856c diff --git a/openslides-vote-service b/openslides-vote-service index 2a40cf8b40..5f59867084 160000 --- a/openslides-vote-service +++ b/openslides-vote-service @@ -1 +1 @@ -Subproject commit 2a40cf8b40547ca892c95d84c6b423ad1811e508 +Subproject commit 5f59867084bcf7072ae5ac44f246fed96ddcec40 From 5850e5a2c15865c22a4e52fa83f92058e84977a6 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Tue, 17 Jun 2025 13:48:57 +0200 Subject: [PATCH 40/60] Small fixes, Typos and Standards --- openslides-auth-service | 2 +- openslides-autoupdate-service | 2 +- openslides-client | 2 +- openslides-datastore-service | 2 +- openslides-manage-service | 2 +- openslides-media-service | 2 +- openslides-search-service | 2 +- openslides-vote-service | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openslides-auth-service b/openslides-auth-service index a4f92109d8..2aba45eb06 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit a4f92109d89162a82471e228f9e6b5c7c8bbd456 +Subproject commit 2aba45eb06228a32f50b1de9bf5581d178452a99 diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 89eaddb08d..4a2fa69068 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 89eaddb08de47a543c3a3af0bdf088728825af1c +Subproject commit 4a2fa69068355ad8d1994e39873d2042d1e77df6 diff --git a/openslides-client b/openslides-client index a1a70d0717..3580538c0c 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit a1a70d0717961f00391fe5db9e90a8200974a7c7 +Subproject commit 3580538c0cafa3a79662d1539c948d5e1fcf6d58 diff --git a/openslides-datastore-service b/openslides-datastore-service index 84b907c1f0..996857f209 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit 84b907c1f0a6a8baa735683bb838cdf0094039df +Subproject commit 996857f2098b5c7af862bdc6c9d8d8e2b13afd9b diff --git a/openslides-manage-service b/openslides-manage-service index 6d1b0eac48..bf53a6e9a2 160000 --- a/openslides-manage-service +++ b/openslides-manage-service @@ -1 +1 @@ -Subproject commit 6d1b0eac4873cce21149602d66f2b92f4d4c3200 +Subproject commit bf53a6e9a22339832f2db7c6e0718ac733ed3f1f diff --git a/openslides-media-service b/openslides-media-service index 410baa5129..911d2cf952 160000 --- a/openslides-media-service +++ b/openslides-media-service @@ -1 +1 @@ -Subproject commit 410baa51293dcc9f3ffe8a3ecbe11f2d4a01c282 +Subproject commit 911d2cf952212d80aa9a3bd4359f20b43ce975ea diff --git a/openslides-search-service b/openslides-search-service index 4bf6c8ad07..563a0c9299 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit 4bf6c8ad07fe01b356eca1d5a9b215e664b0856c +Subproject commit 563a0c9299ac9c2ee2c7122c7063589c216c00fe diff --git a/openslides-vote-service b/openslides-vote-service index 5f59867084..0510597d66 160000 --- a/openslides-vote-service +++ b/openslides-vote-service @@ -1 +1 @@ -Subproject commit 5f59867084bcf7072ae5ac44f246fed96ddcec40 +Subproject commit 0510597d66e398e81034ea6c49f38a3744d31490 From 12ea9dfeb35eedeffa56343eb5198d26c66e2e5f Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 10:25:26 +0200 Subject: [PATCH 41/60] Update Submodule References --- openslides-auth-service | 2 +- openslides-autoupdate-service | 2 +- openslides-backend | 2 +- openslides-client | 2 +- openslides-datastore-service | 2 +- openslides-icc-service | 2 +- openslides-manage-service | 2 +- openslides-media-service | 2 +- openslides-search-service | 2 +- openslides-vote-service | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/openslides-auth-service b/openslides-auth-service index 2aba45eb06..fb97f110cb 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit 2aba45eb06228a32f50b1de9bf5581d178452a99 +Subproject commit fb97f110cbb235e0c1adc7c13f531344639875f5 diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 4a2fa69068..3706631349 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 4a2fa69068355ad8d1994e39873d2042d1e77df6 +Subproject commit 370663134998b19ef83bd3eb6f8c3b94869b99f7 diff --git a/openslides-backend b/openslides-backend index 7d3bd3ad3b..b8808d0682 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit 7d3bd3ad3b52c3f6faed481162b777632cb1961d +Subproject commit b8808d0682721b69c7d6890f167c3eec1b583474 diff --git a/openslides-client b/openslides-client index 3580538c0c..553e4ab554 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit 3580538c0cafa3a79662d1539c948d5e1fcf6d58 +Subproject commit 553e4ab55407e0840cdebc036bcf491b87bcd504 diff --git a/openslides-datastore-service b/openslides-datastore-service index 996857f209..5b14f9f8ef 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit 996857f2098b5c7af862bdc6c9d8d8e2b13afd9b +Subproject commit 5b14f9f8ef1da598b53275f790d9b935d4ce18ad diff --git a/openslides-icc-service b/openslides-icc-service index 7f534dfdc3..c59d155f10 160000 --- a/openslides-icc-service +++ b/openslides-icc-service @@ -1 +1 @@ -Subproject commit 7f534dfdc351b29fc31c356626483b5c66ccac15 +Subproject commit c59d155f10b48e8792ee9ed3cfb5606727bc76d1 diff --git a/openslides-manage-service b/openslides-manage-service index bf53a6e9a2..f8c00a339c 160000 --- a/openslides-manage-service +++ b/openslides-manage-service @@ -1 +1 @@ -Subproject commit bf53a6e9a22339832f2db7c6e0718ac733ed3f1f +Subproject commit f8c00a339ccd3c54cca7b0f467ce3f9b784b4815 diff --git a/openslides-media-service b/openslides-media-service index 911d2cf952..c54c2e83a2 160000 --- a/openslides-media-service +++ b/openslides-media-service @@ -1 +1 @@ -Subproject commit 911d2cf952212d80aa9a3bd4359f20b43ce975ea +Subproject commit c54c2e83a2988ad6d7ea66d360cb57a580e99809 diff --git a/openslides-search-service b/openslides-search-service index 563a0c9299..432dbe700b 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit 563a0c9299ac9c2ee2c7122c7063589c216c00fe +Subproject commit 432dbe700b8fb9654da250be413b618abfa22ae7 diff --git a/openslides-vote-service b/openslides-vote-service index 0510597d66..1566392c4a 160000 --- a/openslides-vote-service +++ b/openslides-vote-service @@ -1 +1 @@ -Subproject commit 0510597d66e398e81034ea6c49f38a3744d31490 +Subproject commit 1566392c4a1c1076b4000d49593860d9def0110f From 13d54b831fe06d3cf70d29894f7ff1007dbb123e Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 10:26:06 +0200 Subject: [PATCH 42/60] Bump --- openslides-icc-service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides-icc-service b/openslides-icc-service index c59d155f10..9ce1c0464d 160000 --- a/openslides-icc-service +++ b/openslides-icc-service @@ -1 +1 @@ -Subproject commit c59d155f10b48e8792ee9ed3cfb5606727bc76d1 +Subproject commit 9ce1c0464d23e87c3b31749d1459fca11e71c118 From 3efaed0df32f935de46abddd4be1cb6c0a4882c0 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 11:32:03 +0200 Subject: [PATCH 43/60] Making common workflows and actions reusable --- dev/actions/project-automation/action.yml | 33 ++++++++++ dev/workflows/close-issues/workflow.yml | 63 +++++++++++++++++++ dev/workflows/pick-to-staging/workflow.yml | 72 ++++++++++++++++++++++ 3 files changed, 168 insertions(+) create mode 100644 dev/actions/project-automation/action.yml create mode 100644 dev/workflows/close-issues/workflow.yml create mode 100644 dev/workflows/pick-to-staging/workflow.yml diff --git a/dev/actions/project-automation/action.yml b/dev/actions/project-automation/action.yml new file mode 100644 index 0000000000..96cc4fdf32 --- /dev/null +++ b/dev/actions/project-automation/action.yml @@ -0,0 +1,33 @@ +name: Project automation +on: + workflow_call: + inputs: + resource_node_id: + required: true + type: string + status_value: + required: true + type: string + gh_app_ID: + required: true + type: string + gh_app_installation_ID: + required: true + type: string + gh_app_secret_key: + required: true + type: string + +jobs: + project-issue: + name: Set status to ${{ inputs.status_value }} + steps: + - uses: leonsteinhaeuser/project-beta-automations@v2.2.1 + with: + gh_app_ID: ${{ inputs.gh_app_ID }} + gh_app_installation_ID: ${{ inputs.gh_app_installation_ID }} + gh_app_secret_key: ${{ inputs.gh_app_secret_key }} + organization: OpenSlides + project_id: 2 + resource_node_id: ${{ inputs.resource_node_id }} + status_value: ${{ inputs.status_value }} \ No newline at end of file diff --git a/dev/workflows/close-issues/workflow.yml b/dev/workflows/close-issues/workflow.yml new file mode 100644 index 0000000000..e9e41baf4b --- /dev/null +++ b/dev/workflows/close-issues/workflow.yml @@ -0,0 +1,63 @@ +name: 'Close Issues' + +description: 'Closes Issues' + +inputs: + branches: + description: 'Regex for the branch this workflow should trigger on' + required: true + +runs: + using: "composite" + runs-on: ubuntu-latest + + steps: + # https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + + - name: Generate access token + uses: tibdex/github-app-token@v2 + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + id: generate-token + with: + app_id: ${{ secrets.AUTOMATION_APP_ID }} + private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} + + - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + uses: octokit/graphql-action@v2.x + id: get-issues + env: + GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} + with: + query: | + query getLinkedIssues($owner: String!, $name: String!, $number: Int!) { + repository(owner: $owner, name: $name) { + pullRequest(number: $number) { + closingIssuesReferences(first: 100) { + nodes { + number + repository { + nameWithOwner + } + } + } + } + } + } + variables: | + owner: ${{ github.repository_owner }} + name: ${{ github.event.repository.name }} + number: ${{ github.event.pull_request.number }} + + - name: Close issues + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + env: + GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} + run: | + issue_data="$(echo '${{ steps.get-issues.outputs.data }}' | jq -r '.repository.pullRequest.closingIssuesReferences.nodes[] | [.number,.repository.nameWithOwner] | @tsv')" + echo "$issue_data" | grep -v "^$" | while read number nameWithOwner; do + gh issue close "$number" -r "$nameWithOwner" + done \ No newline at end of file diff --git a/dev/workflows/pick-to-staging/workflow.yml b/dev/workflows/pick-to-staging/workflow.yml new file mode 100644 index 0000000000..a42aff6df4 --- /dev/null +++ b/dev/workflows/pick-to-staging/workflow.yml @@ -0,0 +1,72 @@ +name: Cherry pick staging PRs merged into main + +description: 'Create PR against staging branch' + +inputs: + branches: + description: 'Regex for the branch this workflow should trigger on' + required: true + +runs: + using: "composite" + runs-on: ubuntu-latest + + steps: + # https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + + - name: Checkout main + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 2 + + - name: Fetch and checkout latest staging branch + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + run: | + branch=$(git ls-remote --heads origin 'staging/*' | awk 'gsub(".*refs/heads/","")' | sort -V | tail -1) + git fetch origin $branch + git checkout $branch + + - name: Set git credentials + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + run: | + git config --global user.name openslides-automation + git config --global user.email openslides-automation@users.noreply.github.com + + - name: Cherry-pick new commit + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + id: cherry-pick + run: | + git fetch origin + # -m 1 to also be able to cherry-pick merge commits + git cherry-pick -m 1 ${{ github.sha }} || { + echo "error=1" >> $GITHUB_OUTPUT + git add . + git cherry-pick --continue + } + + - name: Generate access token + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + uses: tibdex/github-app-token@v2 + id: generate-token + with: + app_id: ${{ secrets.AUTOMATION_APP_ID }} + private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} + + - name: Create or update PR + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ steps.generate-token.outputs.token }} + branch: apply/commit-${{ github.sha }} + delete-branch: true + title: "[Cherry-Pick] ${{ github.event.pull_request.title }}" + body: "Triggered by commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})\n\n${{ steps.cherry-pick.outputs.error && 'There were conflicts during the cherry-pick. These were commited without any resolving. Please resolve them manually and push the result to this branch before merging.' || 'The cherry-pick was successful without any conflicts. You should be able to simply merge this PR.' }}" + reviewers: ${{ github.event.pull_request.user.login }} + assignees: ${{ github.event.pull_request.user.login }} + labels: picked-to-staging \ No newline at end of file From c10e273947d7aba471f337182ed80013701a87e1 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 11:43:23 +0200 Subject: [PATCH 44/60] Unrequire secrets for actions --- dev/actions/project-automation/action.yml | 3 --- openslides-autoupdate-service | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/dev/actions/project-automation/action.yml b/dev/actions/project-automation/action.yml index 96cc4fdf32..54fe5f485e 100644 --- a/dev/actions/project-automation/action.yml +++ b/dev/actions/project-automation/action.yml @@ -9,13 +9,10 @@ on: required: true type: string gh_app_ID: - required: true type: string gh_app_installation_ID: - required: true type: string gh_app_secret_key: - required: true type: string jobs: diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 3706631349..176834432b 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 370663134998b19ef83bd3eb6f8c3b94869b99f7 +Subproject commit 176834432b00f63ecf08a75996ce8d5fbedd9379 From 6d8f2f121d6fb635967f9022a287d5d03e495fe9 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 11:47:21 +0200 Subject: [PATCH 45/60] Moved workflows to .github --- .../workflow.yml => .github/workflows/close-issues.yml | 0 .../workflows/pick-to-staging-service.yml | 0 openslides-autoupdate-service | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename dev/workflows/close-issues/workflow.yml => .github/workflows/close-issues.yml (100%) rename dev/workflows/pick-to-staging/workflow.yml => .github/workflows/pick-to-staging-service.yml (100%) diff --git a/dev/workflows/close-issues/workflow.yml b/.github/workflows/close-issues.yml similarity index 100% rename from dev/workflows/close-issues/workflow.yml rename to .github/workflows/close-issues.yml diff --git a/dev/workflows/pick-to-staging/workflow.yml b/.github/workflows/pick-to-staging-service.yml similarity index 100% rename from dev/workflows/pick-to-staging/workflow.yml rename to .github/workflows/pick-to-staging-service.yml diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 176834432b..4b09f2ecb0 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 176834432b00f63ecf08a75996ce8d5fbedd9379 +Subproject commit 4b09f2ecb074c456666c607ec713324ac52e1634 From 00e1a170bef9a972c09ba637422e4267df26ac2e Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 11:57:13 +0200 Subject: [PATCH 46/60] Debugging Further #4 --- dev/actions/project-automation/action.yml | 6 +++--- openslides-autoupdate-service | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/actions/project-automation/action.yml b/dev/actions/project-automation/action.yml index 54fe5f485e..daf4b65089 100644 --- a/dev/actions/project-automation/action.yml +++ b/dev/actions/project-automation/action.yml @@ -9,11 +9,11 @@ on: required: true type: string gh_app_ID: - type: string + required: true gh_app_installation_ID: - type: string + required: true gh_app_secret_key: - type: string + required: true jobs: project-issue: diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 4b09f2ecb0..73d49bd361 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 4b09f2ecb074c456666c607ec713324ac52e1634 +Subproject commit 73d49bd36155404b38429ac092be199d213b6f63 From 9d361ba8d0f0a9981e3a24d8bdfaa82a624351b7 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 13:49:45 +0200 Subject: [PATCH 47/60] Adding helper action to match branch name with a regex --- dev/actions/branch-regex/action.yml | 32 +++++++++++++++++++++++++++++ openslides-autoupdate-service | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 dev/actions/branch-regex/action.yml diff --git a/dev/actions/branch-regex/action.yml b/dev/actions/branch-regex/action.yml new file mode 100644 index 0000000000..a8879d6c02 --- /dev/null +++ b/dev/actions/branch-regex/action.yml @@ -0,0 +1,32 @@ +name: 'Current Branch Regex Check' +description: 'Checks if current branch matches given regex.' + +inputs: + regex: + description: 'Regex pattern to be analysed' + required: true +outputs: + match: + description: 'Matched pattern. Empty if not matched' + +runs: + using: "composite" + steps: + # https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions + - name: Extract Branch Name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + + # https://github.com/actions-ecosystem/action-regex-match + - name: Regex Check + uses: actions-ecosystem/action-regex-match@v2 + id: regex_match + with: + text: ${{ steps.extract_branch.outputs.branch}} + regex: 'reusable-github-*' + + - name: Export Regex Match + shell: bash + run: echo "match=${{ steps.regex_match.outputs.match }}" >> $GITHUB_OUTPUT + diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 73d49bd361..e7325041ae 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 73d49bd36155404b38429ac092be199d213b6f63 +Subproject commit e7325041ae47031254099b96db463da1d5d30f65 From 9e2b32cac475e1e80fcefc4ae7c0cec838d71ab9 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 13:54:18 +0200 Subject: [PATCH 48/60] Test Branch Regex --- .github/workflows/debug-workflow.yml | 43 ++++++++++++++++++++++++++-- openslides-autoupdate-service | 2 +- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/.github/workflows/debug-workflow.yml b/.github/workflows/debug-workflow.yml index 63d61530a8..b941ed7031 100644 --- a/.github/workflows/debug-workflow.yml +++ b/.github/workflows/debug-workflow.yml @@ -6,7 +6,44 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Test actions - uses: Janmtbehrens/OpenSlides/dev/actions/build-and-test-service@all-in-one + - uses: Janmtbehrens/OpenSlides/dev/actions/branch-regex@reusable-github-actions with: - service: auth \ No newline at end of file + regex: reusable-github-.* + id: regex_match + + - name: Test branch + if: ${{ steps.regex_match.outputs.match != '' }} + run: echo "Branch worked" + + - name: Checks + run: | + echo "${{ steps.regex_match.outputs.match }}" + echo "reusable-github-*" + + - uses: Janmtbehrens/OpenSlides/dev/actions/branch-regex@reusable-github-actions + with: + regex: .* + id: regex_match2 + + - name: Test branch + if: ${{ steps.regex_match2.outputs.match != '' }} + run: echo "Branch worked" + + - name: Checks + run: | + echo "${{ steps.regex_match2.outputs.match }}" + echo "reusable-github-*" + + - uses: Janmtbehrens/OpenSlides/dev/actions/branch-regex@reusable-github-actions + with: + regex: reusable-github-actions + id: regex_match3 + + - name: Test branch + if: ${{ steps.regex_match3.outputs.match != '' }} + run: echo "Branch worked" + + - name: Checks + run: | + echo "${{ steps.regex_match3.outputs.match }}" + echo "reusable-github-*" \ No newline at end of file diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index e7325041ae..12c1631448 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit e7325041ae47031254099b96db463da1d5d30f65 +Subproject commit 12c1631448266ca6902d496b4e8f1c606b1b6587 From 3a44935b4e830b11fcff96238a0a2312516e7658 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 13:56:29 +0200 Subject: [PATCH 49/60] Test Branch Regex #2 --- .github/workflows/close-issues.yml | 11 ++++++----- .github/workflows/debug-workflow.yml | 2 +- .github/workflows/pick-to-staging-service.yml | 10 ++++++---- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml index e9e41baf4b..58490e3604 100644 --- a/.github/workflows/close-issues.yml +++ b/.github/workflows/close-issues.yml @@ -1,11 +1,12 @@ name: 'Close Issues' description: 'Closes Issues' - -inputs: - branches: - description: 'Regex for the branch this workflow should trigger on' - required: true +on: + workflow_call: + inputs: + branches: + description: 'Regex for the branch this workflow should trigger on' + required: true runs: using: "composite" diff --git a/.github/workflows/debug-workflow.yml b/.github/workflows/debug-workflow.yml index b941ed7031..9157f288ec 100644 --- a/.github/workflows/debug-workflow.yml +++ b/.github/workflows/debug-workflow.yml @@ -1,4 +1,4 @@ -on: deployment +on: commit jobs: test-job: diff --git a/.github/workflows/pick-to-staging-service.yml b/.github/workflows/pick-to-staging-service.yml index a42aff6df4..957cea70d1 100644 --- a/.github/workflows/pick-to-staging-service.yml +++ b/.github/workflows/pick-to-staging-service.yml @@ -2,10 +2,12 @@ name: Cherry pick staging PRs merged into main description: 'Create PR against staging branch' -inputs: - branches: - description: 'Regex for the branch this workflow should trigger on' - required: true +on: + workflow_call: + inputs: + branches: + description: 'Regex for the branch this workflow should trigger on' + required: true runs: using: "composite" From a7f118aebe0687ddf25b70d971fc34deade4ba86 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 13:58:29 +0200 Subject: [PATCH 50/60] Test Branch Regex #3 --- .github/workflows/close-issues.yml | 95 ++++++++------- .github/workflows/debug-workflow.yml | 2 +- .github/workflows/pick-to-staging-service.yml | 114 +++++++++--------- 3 files changed, 108 insertions(+), 103 deletions(-) diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml index 58490e3604..2a99194ef7 100644 --- a/.github/workflows/close-issues.yml +++ b/.github/workflows/close-issues.yml @@ -1,6 +1,7 @@ name: 'Close Issues' description: 'Closes Issues' + on: workflow_call: inputs: @@ -8,57 +9,59 @@ on: description: 'Regex for the branch this workflow should trigger on' required: true -runs: - using: "composite" - runs-on: ubuntu-latest +jobs: + workflow_call: + runs: + using: "composite" + runs-on: ubuntu-latest - steps: - # https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions - - name: Extract branch name - shell: bash - run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT - id: extract_branch + steps: + # https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch - - name: Generate access token - uses: tibdex/github-app-token@v2 - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') - id: generate-token - with: - app_id: ${{ secrets.AUTOMATION_APP_ID }} - private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} + - name: Generate access token + uses: tibdex/github-app-token@v2 + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + id: generate-token + with: + app_id: ${{ secrets.AUTOMATION_APP_ID }} + private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} - - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') - uses: octokit/graphql-action@v2.x - id: get-issues - env: - GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} - with: - query: | - query getLinkedIssues($owner: String!, $name: String!, $number: Int!) { - repository(owner: $owner, name: $name) { - pullRequest(number: $number) { - closingIssuesReferences(first: 100) { - nodes { - number - repository { - nameWithOwner + - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + uses: octokit/graphql-action@v2.x + id: get-issues + env: + GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} + with: + query: | + query getLinkedIssues($owner: String!, $name: String!, $number: Int!) { + repository(owner: $owner, name: $name) { + pullRequest(number: $number) { + closingIssuesReferences(first: 100) { + nodes { + number + repository { + nameWithOwner + } + } } } } } - } - } - variables: | - owner: ${{ github.repository_owner }} - name: ${{ github.event.repository.name }} - number: ${{ github.event.pull_request.number }} + variables: | + owner: ${{ github.repository_owner }} + name: ${{ github.event.repository.name }} + number: ${{ github.event.pull_request.number }} - - name: Close issues - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') - env: - GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} - run: | - issue_data="$(echo '${{ steps.get-issues.outputs.data }}' | jq -r '.repository.pullRequest.closingIssuesReferences.nodes[] | [.number,.repository.nameWithOwner] | @tsv')" - echo "$issue_data" | grep -v "^$" | while read number nameWithOwner; do - gh issue close "$number" -r "$nameWithOwner" - done \ No newline at end of file + - name: Close issues + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + env: + GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} + run: | + issue_data="$(echo '${{ steps.get-issues.outputs.data }}' | jq -r '.repository.pullRequest.closingIssuesReferences.nodes[] | [.number,.repository.nameWithOwner] | @tsv')" + echo "$issue_data" | grep -v "^$" | while read number nameWithOwner; do + gh issue close "$number" -r "$nameWithOwner" + done \ No newline at end of file diff --git a/.github/workflows/debug-workflow.yml b/.github/workflows/debug-workflow.yml index 9157f288ec..d2c925898e 100644 --- a/.github/workflows/debug-workflow.yml +++ b/.github/workflows/debug-workflow.yml @@ -1,4 +1,4 @@ -on: commit +on: push jobs: test-job: diff --git a/.github/workflows/pick-to-staging-service.yml b/.github/workflows/pick-to-staging-service.yml index 957cea70d1..2161e543a9 100644 --- a/.github/workflows/pick-to-staging-service.yml +++ b/.github/workflows/pick-to-staging-service.yml @@ -9,66 +9,68 @@ on: description: 'Regex for the branch this workflow should trigger on' required: true -runs: - using: "composite" - runs-on: ubuntu-latest +jobs: + workflow_call: + runs: + using: "composite" + runs-on: ubuntu-latest - steps: - # https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions - - name: Extract branch name - shell: bash - run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT - id: extract_branch + steps: + # https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch - - name: Checkout main - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') - uses: actions/checkout@v4 - with: - ref: main - fetch-depth: 2 + - name: Checkout main + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 2 - - name: Fetch and checkout latest staging branch - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') - run: | - branch=$(git ls-remote --heads origin 'staging/*' | awk 'gsub(".*refs/heads/","")' | sort -V | tail -1) - git fetch origin $branch - git checkout $branch + - name: Fetch and checkout latest staging branch + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + run: | + branch=$(git ls-remote --heads origin 'staging/*' | awk 'gsub(".*refs/heads/","")' | sort -V | tail -1) + git fetch origin $branch + git checkout $branch - - name: Set git credentials - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') - run: | - git config --global user.name openslides-automation - git config --global user.email openslides-automation@users.noreply.github.com + - name: Set git credentials + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + run: | + git config --global user.name openslides-automation + git config --global user.email openslides-automation@users.noreply.github.com - - name: Cherry-pick new commit - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') - id: cherry-pick - run: | - git fetch origin - # -m 1 to also be able to cherry-pick merge commits - git cherry-pick -m 1 ${{ github.sha }} || { - echo "error=1" >> $GITHUB_OUTPUT - git add . - git cherry-pick --continue - } + - name: Cherry-pick new commit + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + id: cherry-pick + run: | + git fetch origin + # -m 1 to also be able to cherry-pick merge commits + git cherry-pick -m 1 ${{ github.sha }} || { + echo "error=1" >> $GITHUB_OUTPUT + git add . + git cherry-pick --continue + } - - name: Generate access token - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') - uses: tibdex/github-app-token@v2 - id: generate-token - with: - app_id: ${{ secrets.AUTOMATION_APP_ID }} - private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} + - name: Generate access token + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + uses: tibdex/github-app-token@v2 + id: generate-token + with: + app_id: ${{ secrets.AUTOMATION_APP_ID }} + private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} - - name: Create or update PR - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') - uses: peter-evans/create-pull-request@v7 - with: - token: ${{ steps.generate-token.outputs.token }} - branch: apply/commit-${{ github.sha }} - delete-branch: true - title: "[Cherry-Pick] ${{ github.event.pull_request.title }}" - body: "Triggered by commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})\n\n${{ steps.cherry-pick.outputs.error && 'There were conflicts during the cherry-pick. These were commited without any resolving. Please resolve them manually and push the result to this branch before merging.' || 'The cherry-pick was successful without any conflicts. You should be able to simply merge this PR.' }}" - reviewers: ${{ github.event.pull_request.user.login }} - assignees: ${{ github.event.pull_request.user.login }} - labels: picked-to-staging \ No newline at end of file + - name: Create or update PR + if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ steps.generate-token.outputs.token }} + branch: apply/commit-${{ github.sha }} + delete-branch: true + title: "[Cherry-Pick] ${{ github.event.pull_request.title }}" + body: "Triggered by commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})\n\n${{ steps.cherry-pick.outputs.error && 'There were conflicts during the cherry-pick. These were commited without any resolving. Please resolve them manually and push the result to this branch before merging.' || 'The cherry-pick was successful without any conflicts. You should be able to simply merge this PR.' }}" + reviewers: ${{ github.event.pull_request.user.login }} + assignees: ${{ github.event.pull_request.user.login }} + labels: picked-to-staging \ No newline at end of file From 1abcd9d2fa96f478f68efbbded8edb71853655b2 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 14:04:06 +0200 Subject: [PATCH 51/60] Test Branch Regex #4 --- .github/workflows/close-issues.yml | 1 - .github/workflows/pick-to-staging-service.yml | 1 - dev/actions/branch-regex/action.yml | 7 ++++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml index 2a99194ef7..c588117021 100644 --- a/.github/workflows/close-issues.yml +++ b/.github/workflows/close-issues.yml @@ -11,7 +11,6 @@ on: jobs: workflow_call: - runs: using: "composite" runs-on: ubuntu-latest diff --git a/.github/workflows/pick-to-staging-service.yml b/.github/workflows/pick-to-staging-service.yml index 2161e543a9..0242d6cd13 100644 --- a/.github/workflows/pick-to-staging-service.yml +++ b/.github/workflows/pick-to-staging-service.yml @@ -11,7 +11,6 @@ on: jobs: workflow_call: - runs: using: "composite" runs-on: ubuntu-latest diff --git a/dev/actions/branch-regex/action.yml b/dev/actions/branch-regex/action.yml index a8879d6c02..e8fafa3fe8 100644 --- a/dev/actions/branch-regex/action.yml +++ b/dev/actions/branch-regex/action.yml @@ -24,9 +24,14 @@ runs: id: regex_match with: text: ${{ steps.extract_branch.outputs.branch}} - regex: 'reusable-github-*' + regex: '${{ inputs.regex }}' - name: Export Regex Match shell: bash run: echo "match=${{ steps.regex_match.outputs.match }}" >> $GITHUB_OUTPUT + id: test + + - name: Test outputs + shell: bash + run: echo "${{ steps.test.outputs.match }}"" From 7a4443b019825aabec05efae83a5dadeeff5ac6e Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 14:05:09 +0200 Subject: [PATCH 52/60] Test Branch Regex #5 --- dev/actions/branch-regex/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/actions/branch-regex/action.yml b/dev/actions/branch-regex/action.yml index e8fafa3fe8..553c9d8d96 100644 --- a/dev/actions/branch-regex/action.yml +++ b/dev/actions/branch-regex/action.yml @@ -33,5 +33,5 @@ runs: - name: Test outputs shell: bash - run: echo "${{ steps.test.outputs.match }}"" + run: echo "${{ steps.test.outputs.match }}" From 4bc1a98725b000aea478490e79e4e3ed0c9d5ea8 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 14:08:57 +0200 Subject: [PATCH 53/60] Test Branch Regex #6 --- dev/actions/branch-regex/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dev/actions/branch-regex/action.yml b/dev/actions/branch-regex/action.yml index 553c9d8d96..2a1d57632a 100644 --- a/dev/actions/branch-regex/action.yml +++ b/dev/actions/branch-regex/action.yml @@ -8,6 +8,7 @@ inputs: outputs: match: description: 'Matched pattern. Empty if not matched' + value: ${{ steps.regex_export.outputs.match }} runs: using: "composite" @@ -29,9 +30,9 @@ runs: - name: Export Regex Match shell: bash run: echo "match=${{ steps.regex_match.outputs.match }}" >> $GITHUB_OUTPUT - id: test + id: regex_export - name: Test outputs shell: bash - run: echo "${{ steps.test.outputs.match }}" + run: echo "${{ steps.regex_export.outputs.match }}" From a87d5ac4c2d1b49fc18b28d71f08b078f8370fe6 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 14:09:54 +0200 Subject: [PATCH 54/60] Test Branch Regex #7 --- .github/workflows/debug-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/debug-workflow.yml b/.github/workflows/debug-workflow.yml index d2c925898e..15a578aa67 100644 --- a/.github/workflows/debug-workflow.yml +++ b/.github/workflows/debug-workflow.yml @@ -22,7 +22,7 @@ jobs: - uses: Janmtbehrens/OpenSlides/dev/actions/branch-regex@reusable-github-actions with: - regex: .* + regex: asfasfasf.* id: regex_match2 - name: Test branch From 2a154c86c0e2321f041b8721e9cfd65eb795669c Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 14:14:31 +0200 Subject: [PATCH 55/60] Clarify that reusable workflows require a branches regex --- .github/workflows/close-issues.yml | 15 +++++----- .github/workflows/debug-workflow.yml | 30 +------------------ .github/workflows/pick-to-staging-service.yml | 21 +++++++------ 3 files changed, 18 insertions(+), 48 deletions(-) diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml index c588117021..1e65bdd78a 100644 --- a/.github/workflows/close-issues.yml +++ b/.github/workflows/close-issues.yml @@ -5,7 +5,7 @@ description: 'Closes Issues' on: workflow_call: inputs: - branches: + branch_regex: description: 'Regex for the branch this workflow should trigger on' required: true @@ -15,21 +15,20 @@ jobs: runs-on: ubuntu-latest steps: - # https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions - - name: Extract branch name - shell: bash - run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + - uses: Janmtbehrens/OpenSlides/dev/actions/branch-regex@reusable-github-actions + with: + regex: ${{ inputs.branch_regex }} id: extract_branch - name: Generate access token uses: tibdex/github-app-token@v2 - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + if: ${{ steps.extract_branch.outputs.branch != ''}} id: generate-token with: app_id: ${{ secrets.AUTOMATION_APP_ID }} private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} - - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + - if: ${{ steps.extract_branch.outputs.branch != ''}} uses: octokit/graphql-action@v2.x id: get-issues env: @@ -56,7 +55,7 @@ jobs: number: ${{ github.event.pull_request.number }} - name: Close issues - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + if: ${{ steps.extract_branch.outputs.branch != ''}} env: GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} run: | diff --git a/.github/workflows/debug-workflow.yml b/.github/workflows/debug-workflow.yml index 15a578aa67..756929d70b 100644 --- a/.github/workflows/debug-workflow.yml +++ b/.github/workflows/debug-workflow.yml @@ -1,4 +1,4 @@ -on: push +on: fork jobs: test-job: @@ -18,32 +18,4 @@ jobs: - name: Checks run: | echo "${{ steps.regex_match.outputs.match }}" - echo "reusable-github-*" - - - uses: Janmtbehrens/OpenSlides/dev/actions/branch-regex@reusable-github-actions - with: - regex: asfasfasf.* - id: regex_match2 - - - name: Test branch - if: ${{ steps.regex_match2.outputs.match != '' }} - run: echo "Branch worked" - - - name: Checks - run: | - echo "${{ steps.regex_match2.outputs.match }}" - echo "reusable-github-*" - - - uses: Janmtbehrens/OpenSlides/dev/actions/branch-regex@reusable-github-actions - with: - regex: reusable-github-actions - id: regex_match3 - - - name: Test branch - if: ${{ steps.regex_match3.outputs.match != '' }} - run: echo "Branch worked" - - - name: Checks - run: | - echo "${{ steps.regex_match3.outputs.match }}" echo "reusable-github-*" \ No newline at end of file diff --git a/.github/workflows/pick-to-staging-service.yml b/.github/workflows/pick-to-staging-service.yml index 0242d6cd13..a4a779d77e 100644 --- a/.github/workflows/pick-to-staging-service.yml +++ b/.github/workflows/pick-to-staging-service.yml @@ -5,7 +5,7 @@ description: 'Create PR against staging branch' on: workflow_call: inputs: - branches: + branch_regex: description: 'Regex for the branch this workflow should trigger on' required: true @@ -15,34 +15,33 @@ jobs: runs-on: ubuntu-latest steps: - # https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions - - name: Extract branch name - shell: bash - run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + - uses: Janmtbehrens/OpenSlides/dev/actions/branch-regex@reusable-github-actions + with: + regex: ${{ inputs.branch_regex }} id: extract_branch - name: Checkout main - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + if: ${{ steps.extract_branch.outputs.branch != ''}} uses: actions/checkout@v4 with: ref: main fetch-depth: 2 - name: Fetch and checkout latest staging branch - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + if: ${{ steps.extract_branch.outputs.branch != ''}} run: | branch=$(git ls-remote --heads origin 'staging/*' | awk 'gsub(".*refs/heads/","")' | sort -V | tail -1) git fetch origin $branch git checkout $branch - name: Set git credentials - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + if: ${{ steps.extract_branch.outputs.branch != ''}} run: | git config --global user.name openslides-automation git config --global user.email openslides-automation@users.noreply.github.com - name: Cherry-pick new commit - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + if: ${{ steps.extract_branch.outputs.branch != ''}} id: cherry-pick run: | git fetch origin @@ -54,7 +53,7 @@ jobs: } - name: Generate access token - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + if: ${{ steps.extract_branch.outputs.branch != ''}} uses: tibdex/github-app-token@v2 id: generate-token with: @@ -62,7 +61,7 @@ jobs: private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} - name: Create or update PR - if: startsWith('${{ steps.extract_branch.outputs.branch}}', '${{ inputs.branches }}') + if: ${{ steps.extract_branch.outputs.branch != ''}} uses: peter-evans/create-pull-request@v7 with: token: ${{ steps.generate-token.outputs.token }} From 242a1b122cde39178528d36eafffaebf1e02b03d Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 14:55:46 +0200 Subject: [PATCH 56/60] Add Issue & PR Workflow as reusable Workflows --- .github/workflows/reusable-issue-workflow.yml | 36 +++++++++ .../reusable-pull-request-workflow.yml | 74 +++++++++++++++++++ openslides-autoupdate-service | 2 +- 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/reusable-issue-workflow.yml create mode 100644 .github/workflows/reusable-pull-request-workflow.yml diff --git a/.github/workflows/reusable-issue-workflow.yml b/.github/workflows/reusable-issue-workflow.yml new file mode 100644 index 0000000000..95ff2bd3ce --- /dev/null +++ b/.github/workflows/reusable-issue-workflow.yml @@ -0,0 +1,36 @@ +name: 'Issue Actions' + +description: 'Various Issue related Actions' + +on: + workflow_call: + inputs: + action_type: + description: Event Action Type that triggered this workflow + required: true + +jobs: + project-automation-calls: + runs-on: ubuntu-latest + secrets: inherit + steps: + - name: Issue closed + if: ${{ inputs.action_type == "closed" }} + uses: Janmtbehrens/OpenSlides/dev/actions/project-automation@reusable-github-actions + with: + resource_node_id: ${{ github.event.issue.node_id }} + status_value: "Done" + gh_app_ID: ${{ secrets.AUTOMATION_APP_ID }} + gh_app_installation_ID: ${{ secrets.AUTOMATION_APP_INSTALLATION_ID }} + gh_app_secret_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} + + + - name: Issue opened + if: ${{ inputs.action_type == "opened" || inputs.action_type == "reopened" }} + uses: Janmtbehrens/OpenSlides/dev/actions/project-automation@reusable-github-actions + with: + resource_node_id: ${{ github.event.issue.node_id }} + status_value: "Backlog" + gh_app_ID: ${{ secrets.AUTOMATION_APP_ID }} + gh_app_installation_ID: ${{ secrets.AUTOMATION_APP_INSTALLATION_ID }} + gh_app_secret_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} \ No newline at end of file diff --git a/.github/workflows/reusable-pull-request-workflow.yml b/.github/workflows/reusable-pull-request-workflow.yml new file mode 100644 index 0000000000..8998eb5e36 --- /dev/null +++ b/.github/workflows/reusable-pull-request-workflow.yml @@ -0,0 +1,74 @@ +name: 'Pull Request Actions' + +description: 'Various PR related Actions' + +on: + workflow_call: + inputs: + action_type: + description: Event Action Type that triggered this workflow. Should be set to github.event.action + required: true + pull_request_merged: + description: Flag for Merge PR. Should be set to github.event.pull_request.merged + required: true + pull_request_label: + description: PR Label. Should be set to github.event.pull_request.labels.*.name + required: true + pull_request_node: + description: PR Node. Should be set to github.event.pull_request.node_id + required: true + +jobs: + close-issues: + name: Close issues + if: ${{ inputs.pull_request_merged == true && github.event.branches == "feature/*" }} + uses: Janmtbehrens/OpenSlides/.github/workflows/close-issues.yml@reusable-github-actions + secrets: inherit + with: + branches: "feature/.*" + + create-pr-for-staging: + name: Create PR for Staging + if: | + ${{ inputs.pull_request_merged == true && + contains(inputs.pull_request_label, 'staging') && + github.event.branches == "main" }} + uses: Janmtbehrens/OpenSlides/.github/workflows/pick-to-staging-service.yml@reusable-github-actions + secrets: inherit + with: + branches: "main" + + project-pull-requests: + runs-on: ubuntu:latest + secrets: inherit + steps: + - name: Pull request closed new + if: ${{ inputs.action_type == "closed" }} + uses: Janmtbehrens/OpenSlides/dev/actions/project-automation@reusable-github-actions + with: + resource_node_id: ${{ inputs.pull_request_node }} + status_value: "Done" + gh_app_ID: ${{ secrets.AUTOMATION_APP_ID }} + gh_app_installation_ID: ${{ secrets.AUTOMATION_APP_INSTALLATION_ID }} + gh_app_secret_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} + + - name: Pull request opened new + if: ${{ inputs.action_type == "opened" || inputs.action_type == "reopened" }} + uses: Janmtbehrens/OpenSlides/dev/actions/project-automation@reusable-github-actions + with: + resource_node_id: ${{ inputs.pull_request_node }} + status_value: "Backlog" + gh_app_ID: ${{ secrets.AUTOMATION_APP_ID }} + gh_app_installation_ID: ${{ secrets.AUTOMATION_APP_INSTALLATION_ID }} + gh_app_secret_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} + + - name: Pull request review requested new + if: ${{ inputs.action_type == "review_requested" }} + uses: Janmtbehrens/OpenSlides/dev/actions/project-automation@reusable-github-actions + with: + resource_node_id: ${{ inputs.pull_request_node }} + status_value: "Review in progress" + gh_app_ID: ${{ secrets.AUTOMATION_APP_ID }} + gh_app_installation_ID: ${{ secrets.AUTOMATION_APP_INSTALLATION_ID }} + gh_app_secret_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} + diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 12c1631448..8aaa512f95 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 12c1631448266ca6902d496b4e8f1c606b1b6587 +Subproject commit 8aaa512f95af4e87c077417b3ea41066cc384f72 From 1014add8a5219436e45f4b5beb0de859f95d8be3 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Thu, 19 Jun 2025 16:14:12 +0200 Subject: [PATCH 57/60] Implemented reused Workflows in all Services --- openslides-auth-service | 2 +- openslides-autoupdate-service | 2 +- openslides-backend | 2 +- openslides-client | 2 +- openslides-datastore-service | 2 +- openslides-icc-service | 2 +- openslides-manage-service | 2 +- openslides-media-service | 2 +- openslides-proxy | 2 +- openslides-search-service | 2 +- openslides-vote-service | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/openslides-auth-service b/openslides-auth-service index fb97f110cb..cc3ef7759f 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit fb97f110cbb235e0c1adc7c13f531344639875f5 +Subproject commit cc3ef7759fdcbd72a8b2d56758d81f93c5994a7d diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 8aaa512f95..474bec4931 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 8aaa512f95af4e87c077417b3ea41066cc384f72 +Subproject commit 474bec493122e62f70d0793920ac475fa91eee3f diff --git a/openslides-backend b/openslides-backend index b8808d0682..43c256eaf4 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit b8808d0682721b69c7d6890f167c3eec1b583474 +Subproject commit 43c256eaf4b21b5bc28d6d00ad4f5f1947ce3326 diff --git a/openslides-client b/openslides-client index 553e4ab554..dc87c78054 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit 553e4ab55407e0840cdebc036bcf491b87bcd504 +Subproject commit dc87c780542a0f7daba5c5460c32d011f451d304 diff --git a/openslides-datastore-service b/openslides-datastore-service index 5b14f9f8ef..4fe62463f0 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit 5b14f9f8ef1da598b53275f790d9b935d4ce18ad +Subproject commit 4fe62463f0a1c5dc33a066017d52d14f52049894 diff --git a/openslides-icc-service b/openslides-icc-service index 9ce1c0464d..188c6de328 160000 --- a/openslides-icc-service +++ b/openslides-icc-service @@ -1 +1 @@ -Subproject commit 9ce1c0464d23e87c3b31749d1459fca11e71c118 +Subproject commit 188c6de328fe56ce4b79bb3258d670ae83f7e0bb diff --git a/openslides-manage-service b/openslides-manage-service index f8c00a339c..e0627b25e3 160000 --- a/openslides-manage-service +++ b/openslides-manage-service @@ -1 +1 @@ -Subproject commit f8c00a339ccd3c54cca7b0f467ce3f9b784b4815 +Subproject commit e0627b25e33ee5763e27a27e5f479b20786bef5e diff --git a/openslides-media-service b/openslides-media-service index c54c2e83a2..360ea01f71 160000 --- a/openslides-media-service +++ b/openslides-media-service @@ -1 +1 @@ -Subproject commit c54c2e83a2988ad6d7ea66d360cb57a580e99809 +Subproject commit 360ea01f715a511bb67b7065c4cc65fb1627a4d8 diff --git a/openslides-proxy b/openslides-proxy index b11de7f5ee..480f9c4010 160000 --- a/openslides-proxy +++ b/openslides-proxy @@ -1 +1 @@ -Subproject commit b11de7f5eea559cb862f3b4f32fa6c33090a0004 +Subproject commit 480f9c4010f347bf6c1436a29b2eaf5d2bd7baaf diff --git a/openslides-search-service b/openslides-search-service index 432dbe700b..20cd805b44 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit 432dbe700b8fb9654da250be413b618abfa22ae7 +Subproject commit 20cd805b44d7ec8b6247f6f3952d8672818728d7 diff --git a/openslides-vote-service b/openslides-vote-service index 1566392c4a..7443faf8a0 160000 --- a/openslides-vote-service +++ b/openslides-vote-service @@ -1 +1 @@ -Subproject commit 1566392c4a1c1076b4000d49593860d9def0110f +Subproject commit 7443faf8a035a5a6c83e5a120fedfd8dbd301857 From b635a59a12eca9dc29b9ff88a7e3146ab317aa63 Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Mon, 23 Jun 2025 11:07:07 +0200 Subject: [PATCH 58/60] Make main repository use reusable workflows as well --- .github/workflows/pick-to-staging-service.yml | 74 ----------- .github/workflows/pick-to-staging.yml | 117 ++++++++++-------- .github/workflows/project-issue-closed.yml | 14 --- .../workflows/project-pull-request-closed.yml | 14 --- .../workflows/project-pull-request-opened.yml | 15 --- .../project-pull-request-review-requested.yml | 14 --- .../reusable-pull-request-workflow.yml | 31 +++-- .github/workflows/reused-issues-workflow.yml | 12 ++ .../reused-pull-request-workflow.yml | 19 +++ 9 files changed, 118 insertions(+), 192 deletions(-) delete mode 100644 .github/workflows/pick-to-staging-service.yml delete mode 100644 .github/workflows/project-issue-closed.yml delete mode 100644 .github/workflows/project-pull-request-closed.yml delete mode 100644 .github/workflows/project-pull-request-opened.yml delete mode 100644 .github/workflows/project-pull-request-review-requested.yml create mode 100644 .github/workflows/reused-issues-workflow.yml create mode 100644 .github/workflows/reused-pull-request-workflow.yml diff --git a/.github/workflows/pick-to-staging-service.yml b/.github/workflows/pick-to-staging-service.yml deleted file mode 100644 index a4a779d77e..0000000000 --- a/.github/workflows/pick-to-staging-service.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Cherry pick staging PRs merged into main - -description: 'Create PR against staging branch' - -on: - workflow_call: - inputs: - branch_regex: - description: 'Regex for the branch this workflow should trigger on' - required: true - -jobs: - workflow_call: - using: "composite" - runs-on: ubuntu-latest - - steps: - - uses: Janmtbehrens/OpenSlides/dev/actions/branch-regex@reusable-github-actions - with: - regex: ${{ inputs.branch_regex }} - id: extract_branch - - - name: Checkout main - if: ${{ steps.extract_branch.outputs.branch != ''}} - uses: actions/checkout@v4 - with: - ref: main - fetch-depth: 2 - - - name: Fetch and checkout latest staging branch - if: ${{ steps.extract_branch.outputs.branch != ''}} - run: | - branch=$(git ls-remote --heads origin 'staging/*' | awk 'gsub(".*refs/heads/","")' | sort -V | tail -1) - git fetch origin $branch - git checkout $branch - - - name: Set git credentials - if: ${{ steps.extract_branch.outputs.branch != ''}} - run: | - git config --global user.name openslides-automation - git config --global user.email openslides-automation@users.noreply.github.com - - - name: Cherry-pick new commit - if: ${{ steps.extract_branch.outputs.branch != ''}} - id: cherry-pick - run: | - git fetch origin - # -m 1 to also be able to cherry-pick merge commits - git cherry-pick -m 1 ${{ github.sha }} || { - echo "error=1" >> $GITHUB_OUTPUT - git add . - git cherry-pick --continue - } - - - name: Generate access token - if: ${{ steps.extract_branch.outputs.branch != ''}} - uses: tibdex/github-app-token@v2 - id: generate-token - with: - app_id: ${{ secrets.AUTOMATION_APP_ID }} - private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} - - - name: Create or update PR - if: ${{ steps.extract_branch.outputs.branch != ''}} - uses: peter-evans/create-pull-request@v7 - with: - token: ${{ steps.generate-token.outputs.token }} - branch: apply/commit-${{ github.sha }} - delete-branch: true - title: "[Cherry-Pick] ${{ github.event.pull_request.title }}" - body: "Triggered by commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})\n\n${{ steps.cherry-pick.outputs.error && 'There were conflicts during the cherry-pick. These were commited without any resolving. Please resolve them manually and push the result to this branch before merging.' || 'The cherry-pick was successful without any conflicts. You should be able to simply merge this PR.' }}" - reviewers: ${{ github.event.pull_request.user.login }} - assignees: ${{ github.event.pull_request.user.login }} - labels: picked-to-staging \ No newline at end of file diff --git a/.github/workflows/pick-to-staging.yml b/.github/workflows/pick-to-staging.yml index 5cdab2b51f..a4a779d77e 100644 --- a/.github/workflows/pick-to-staging.yml +++ b/.github/workflows/pick-to-staging.yml @@ -1,65 +1,74 @@ name: Cherry pick staging PRs merged into main -on: - pull_request_target: - types: - - closed - branches: - - 'main' +description: 'Create PR against staging branch' +on: + workflow_call: + inputs: + branch_regex: + description: 'Regex for the branch this workflow should trigger on' + required: true jobs: - create-pr-for-staging: - if: | - github.event.pull_request.merged == true && - contains(github.event.pull_request.labels.*.name, 'staging') - name: Create PR against staging branch - runs-on: ubuntu-latest + workflow_call: + using: "composite" + runs-on: ubuntu-latest + + steps: + - uses: Janmtbehrens/OpenSlides/dev/actions/branch-regex@reusable-github-actions + with: + regex: ${{ inputs.branch_regex }} + id: extract_branch - steps: - - name: Checkout main - uses: actions/checkout@v4 - with: - ref: main - fetch-depth: 2 + - name: Checkout main + if: ${{ steps.extract_branch.outputs.branch != ''}} + uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 2 - - name: Fetch and checkout latest staging branch - run: | - branch=$(git ls-remote --heads origin 'staging/*' | awk 'gsub(".*refs/heads/","")' | sort -V | tail -1) - git fetch origin $branch - git checkout $branch + - name: Fetch and checkout latest staging branch + if: ${{ steps.extract_branch.outputs.branch != ''}} + run: | + branch=$(git ls-remote --heads origin 'staging/*' | awk 'gsub(".*refs/heads/","")' | sort -V | tail -1) + git fetch origin $branch + git checkout $branch - - name: Set git credentials - run: | - git config --global user.name openslides-automation - git config --global user.email openslides-automation@users.noreply.github.com + - name: Set git credentials + if: ${{ steps.extract_branch.outputs.branch != ''}} + run: | + git config --global user.name openslides-automation + git config --global user.email openslides-automation@users.noreply.github.com - - name: Cherry-pick new commit - id: cherry-pick - run: | - git fetch origin - # -m 1 to also be able to cherry-pick merge commits - git cherry-pick -m 1 ${{ github.sha }} || { - echo "error=1" >> $GITHUB_OUTPUT - git add . - git cherry-pick --continue - } + - name: Cherry-pick new commit + if: ${{ steps.extract_branch.outputs.branch != ''}} + id: cherry-pick + run: | + git fetch origin + # -m 1 to also be able to cherry-pick merge commits + git cherry-pick -m 1 ${{ github.sha }} || { + echo "error=1" >> $GITHUB_OUTPUT + git add . + git cherry-pick --continue + } - - name: Generate access token - uses: tibdex/github-app-token@v2 - id: generate-token - with: - app_id: ${{ secrets.AUTOMATION_APP_ID }} - private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} + - name: Generate access token + if: ${{ steps.extract_branch.outputs.branch != ''}} + uses: tibdex/github-app-token@v2 + id: generate-token + with: + app_id: ${{ secrets.AUTOMATION_APP_ID }} + private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} - - name: Create or update PR - uses: peter-evans/create-pull-request@v6 - with: - token: ${{ steps.generate-token.outputs.token }} - branch: apply/commit-${{ github.sha }} - delete-branch: true - title: "[Cherry-Pick] ${{ github.event.pull_request.title }}" - body: "Triggered by commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})\n\n${{ steps.cherry-pick.outputs.error && 'There were conflicts during the cherry-pick. These were commited without any resolving. Please resolve them manually and push the result to this branch before merging.' || 'The cherry-pick was successful without any conflicts. You should be able to simply merge this PR.' }}" - reviewers: ${{ github.event.pull_request.user.login }} - assignees: ${{ github.event.pull_request.user.login }} - labels: picked-to-staging + - name: Create or update PR + if: ${{ steps.extract_branch.outputs.branch != ''}} + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ steps.generate-token.outputs.token }} + branch: apply/commit-${{ github.sha }} + delete-branch: true + title: "[Cherry-Pick] ${{ github.event.pull_request.title }}" + body: "Triggered by commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})\n\n${{ steps.cherry-pick.outputs.error && 'There were conflicts during the cherry-pick. These were commited without any resolving. Please resolve them manually and push the result to this branch before merging.' || 'The cherry-pick was successful without any conflicts. You should be able to simply merge this PR.' }}" + reviewers: ${{ github.event.pull_request.user.login }} + assignees: ${{ github.event.pull_request.user.login }} + labels: picked-to-staging \ No newline at end of file diff --git a/.github/workflows/project-issue-closed.yml b/.github/workflows/project-issue-closed.yml deleted file mode 100644 index 8f356552f9..0000000000 --- a/.github/workflows/project-issue-closed.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Project automation (Done on issue closed) -on: - issues: - types: - - closed - -jobs: - issue_closed: - name: Issue closed - uses: ./.github/workflows/project-automation.yml - secrets: inherit - with: - resource_node_id: ${{ github.event.issue.node_id }} - status_value: "Done" diff --git a/.github/workflows/project-pull-request-closed.yml b/.github/workflows/project-pull-request-closed.yml deleted file mode 100644 index ae7726cd03..0000000000 --- a/.github/workflows/project-pull-request-closed.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Project automation (Done on PR closed) -on: - pull_request_target: - types: - - closed - -jobs: - pull_request_closed: - name: Pull request closed - uses: ./.github/workflows/project-automation.yml - secrets: inherit - with: - resource_node_id: ${{ github.event.pull_request.node_id }} - status_value: "Done" diff --git a/.github/workflows/project-pull-request-opened.yml b/.github/workflows/project-pull-request-opened.yml deleted file mode 100644 index 219598d3a6..0000000000 --- a/.github/workflows/project-pull-request-opened.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Project automation (WIP on PR opened) -on: - pull_request_target: - types: - - opened - - reopened - -jobs: - pull_request_opened: - name: Pull request opened - uses: ./.github/workflows/project-automation.yml - secrets: inherit - with: - resource_node_id: ${{ github.event.pull_request.node_id }} - status_value: "Work in progress" diff --git a/.github/workflows/project-pull-request-review-requested.yml b/.github/workflows/project-pull-request-review-requested.yml deleted file mode 100644 index 3b0e5ca737..0000000000 --- a/.github/workflows/project-pull-request-review-requested.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Project automation (ReviewIP on PR review_requested) -on: - pull_request_target: - types: - - review_requested - -jobs: - pull_request_review_requested: - name: Pull request review requested - uses: ./.github/workflows/project-automation.yml - secrets: inherit - with: - resource_node_id: ${{ github.event.pull_request.node_id }} - status_value: "Review in progress" diff --git a/.github/workflows/reusable-pull-request-workflow.yml b/.github/workflows/reusable-pull-request-workflow.yml index 8998eb5e36..1399b85c57 100644 --- a/.github/workflows/reusable-pull-request-workflow.yml +++ b/.github/workflows/reusable-pull-request-workflow.yml @@ -17,32 +17,49 @@ on: pull_request_node: description: PR Node. Should be set to github.event.pull_request.node_id required: true + is_main_branch: + description: Main repository should behave slightly different from Service Branches. Set this to true, if this Workflow is called from the main repository + default: false jobs: close-issues: name: Close issues - if: ${{ inputs.pull_request_merged == true && github.event.branches == "feature/*" }} + if: ${{ is_main_branch != true && inputs.pull_request_merged == true && github.event.branches == "feature/*" }} uses: Janmtbehrens/OpenSlides/.github/workflows/close-issues.yml@reusable-github-actions secrets: inherit with: branches: "feature/.*" create-pr-for-staging: - name: Create PR for Staging + name: Create PR for Staging (Service) if: | - ${{ inputs.pull_request_merged == true && + ${{ is_main_branch != true && + inputs.pull_request_merged == true && contains(inputs.pull_request_label, 'staging') && github.event.branches == "main" }} - uses: Janmtbehrens/OpenSlides/.github/workflows/pick-to-staging-service.yml@reusable-github-actions + uses: Janmtbehrens/OpenSlides/.github/workflows/pick-to-staging.yml@reusable-github-actions secrets: inherit with: branches: "main" + + + create-pr-for-staging: + name: Create PR for Staging (Main) + if: | + ${{ is_main_branch == true && + inputs.pull_request_merged == true && + contains(inputs.pull_request_label, 'staging') && + github.event.branches == "main" }} + uses: Janmtbehrens/OpenSlides/.github/workflows/pick-to-staging.yml@reusable-github-actions + secrets: inherit + with: + branches: "" project-pull-requests: runs-on: ubuntu:latest secrets: inherit steps: - - name: Pull request closed new + - name: Pull request closed (Done on PR closed) if: ${{ inputs.action_type == "closed" }} uses: Janmtbehrens/OpenSlides/dev/actions/project-automation@reusable-github-actions with: @@ -52,7 +69,7 @@ jobs: gh_app_installation_ID: ${{ secrets.AUTOMATION_APP_INSTALLATION_ID }} gh_app_secret_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} - - name: Pull request opened new + - name: Pull request opened (WIP on PR opened) if: ${{ inputs.action_type == "opened" || inputs.action_type == "reopened" }} uses: Janmtbehrens/OpenSlides/dev/actions/project-automation@reusable-github-actions with: @@ -62,7 +79,7 @@ jobs: gh_app_installation_ID: ${{ secrets.AUTOMATION_APP_INSTALLATION_ID }} gh_app_secret_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} - - name: Pull request review requested new + - name: Pull request review requested (ReviewIP on PR review_requested) if: ${{ inputs.action_type == "review_requested" }} uses: Janmtbehrens/OpenSlides/dev/actions/project-automation@reusable-github-actions with: diff --git a/.github/workflows/reused-issues-workflow.yml b/.github/workflows/reused-issues-workflow.yml new file mode 100644 index 0000000000..ee167eb4ad --- /dev/null +++ b/.github/workflows/reused-issues-workflow.yml @@ -0,0 +1,12 @@ +on: + issues: + types: + - closed + +jobs: + project-automation-calls: + uses: Janmtbehrens/OpenSlides/.github/workflows/reusable-issue-workflow.yml@reusable-github-actions + with: + action_type: ${{ github.event.action }} + runs-on: ubuntu-latest + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/reused-pull-request-workflow.yml b/.github/workflows/reused-pull-request-workflow.yml new file mode 100644 index 0000000000..a7e1f1f853 --- /dev/null +++ b/.github/workflows/reused-pull-request-workflow.yml @@ -0,0 +1,19 @@ +on: + pull_request_target: + types: + - closed + - opened + - reopened + - review_requested + +jobs: + project-automation-calls: + uses: Janmtbehrens/OpenSlides/.github/workflows/reusable-pull_request-workflow.yml@reusable-github-actions + with: + action_type: ${{ github.event.action }} + pull_request_merged: ${{ github.event.pull_request.merged }} + pull_request_label: ${{ github.event.pull_request.labels.*.name }} + pull_request_node: ${{ github.event.pull_request.node_id }} + is_main_branch: true + runs-on: ubuntu-latest + secrets: inherit From e0f14d054edf063d11c3b4ab379100d7122802dd Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Mon, 23 Jun 2025 11:09:48 +0200 Subject: [PATCH 59/60] Bugfix --- .github/workflows/reusable-pull-request-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-pull-request-workflow.yml b/.github/workflows/reusable-pull-request-workflow.yml index 1399b85c57..70d8ca29a9 100644 --- a/.github/workflows/reusable-pull-request-workflow.yml +++ b/.github/workflows/reusable-pull-request-workflow.yml @@ -30,7 +30,7 @@ jobs: with: branches: "feature/.*" - create-pr-for-staging: + create-pr-for-staging-service: name: Create PR for Staging (Service) if: | ${{ is_main_branch != true && @@ -43,7 +43,7 @@ jobs: branches: "main" - create-pr-for-staging: + create-pr-for-staging-main: name: Create PR for Staging (Main) if: | ${{ is_main_branch == true && From e7dffa8e8112e3ce231b817137b15575b642563a Mon Sep 17 00:00:00 2001 From: Jan Malte Behrens Date: Mon, 30 Jun 2025 09:21:38 +0200 Subject: [PATCH 60/60] Whitespaces removed --- dev/actions/branch-regex/action.yml | 2 +- dev/actions/build-and-test-service/action.yml | 4 ++-- dev/actions/build-service/action.yml | 16 ++++++++-------- dev/scripts/makefile/build-all-submodules.sh | 2 +- dev/scripts/makefile/test-all-submodules.sh | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dev/actions/branch-regex/action.yml b/dev/actions/branch-regex/action.yml index 2a1d57632a..6d69672fec 100644 --- a/dev/actions/branch-regex/action.yml +++ b/dev/actions/branch-regex/action.yml @@ -2,7 +2,7 @@ name: 'Current Branch Regex Check' description: 'Checks if current branch matches given regex.' inputs: - regex: + regex: description: 'Regex pattern to be analysed' required: true outputs: diff --git a/dev/actions/build-and-test-service/action.yml b/dev/actions/build-and-test-service/action.yml index d57cebe190..cbc8cb3bfc 100644 --- a/dev/actions/build-and-test-service/action.yml +++ b/dev/actions/build-and-test-service/action.yml @@ -2,7 +2,7 @@ name: 'Build and run service tests' description: 'Build test context image and runs all tests of service.' inputs: - service: + service: description: 'Name of the service. Examples: proxy, auth, datastore' required: true @@ -12,7 +12,7 @@ runs: - name: "Build Test" uses: Janmtbehrens/OpenSlides/dev/actions/build-service@all-in-one with: - service: ${{ inputs.service }} + service: ${{ inputs.service }} context: tests - name: "Test Service" shell: bash diff --git a/dev/actions/build-service/action.yml b/dev/actions/build-service/action.yml index f7b3db904b..bd4d48e0a2 100644 --- a/dev/actions/build-service/action.yml +++ b/dev/actions/build-service/action.yml @@ -1,17 +1,17 @@ name: 'Build service' description: 'Builds service image for given context' inputs: - service: + service: description: 'Name of the service. Examples: proxy, auth, datastore' required: true - context: + context: description: 'Build Context. Possible options: prod, dev, tests' required: true - module: + module: description: 'Optional module of the service. Examples: reader, writer' required: false default: "" - port: + port: description: 'Optional port of the service' required: false default: "" @@ -22,8 +22,8 @@ runs: shell: bash run: bash $GITHUB_ACTION_PATH/action-run.sh env: - SERVICE: ${{ inputs.service }} - CONTEXT: ${{ inputs.context }} - MODULE: ${{ inputs.module }} - PORT: ${{ inputs.port }} + SERVICE: ${{ inputs.service }} + CONTEXT: ${{ inputs.context }} + MODULE: ${{ inputs.module }} + PORT: ${{ inputs.port }} GITHUB_ACTION_PATH: $GITHUB_ACTION_PATH \ No newline at end of file diff --git a/dev/scripts/makefile/build-all-submodules.sh b/dev/scripts/makefile/build-all-submodules.sh index eba144e9cd..5e4df2cfed 100755 --- a/dev/scripts/makefile/build-all-submodules.sh +++ b/dev/scripts/makefile/build-all-submodules.sh @@ -32,6 +32,6 @@ for DIR in $(git submodule foreach --recursive -q sh -c pwd); do # Execute test info " --- Building service ${SUBMODULE} for context ${CONTEXT} --- " && \ - echocmd eval "make build-${CONTEXT}" + echocmd eval "make build-${CONTEXT}" done wait \ No newline at end of file diff --git a/dev/scripts/makefile/test-all-submodules.sh b/dev/scripts/makefile/test-all-submodules.sh index 10e0de80a2..27e35abcb7 100644 --- a/dev/scripts/makefile/test-all-submodules.sh +++ b/dev/scripts/makefile/test-all-submodules.sh @@ -28,9 +28,9 @@ for DIR in $(git submodule foreach --recursive -q sh -c pwd); do # Execute test info "Testing service ${SUBMODULE}" && \ - export ERROR_FOUND="" &&\ + export ERROR_FOUND="" && \ echocmd make "run-tests" || export ERROR_FOUND="1" && \ - outputs[$SUBMODULE]="${?}${ERROR_FOUND}" + outputs[$SUBMODULE]="${?}${ERROR_FOUND}" done for x in "${!outputs[@]}"; do