diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml new file mode 100644 index 0000000000..1e65bdd78a --- /dev/null +++ b/.github/workflows/close-issues.yml @@ -0,0 +1,65 @@ +name: 'Close Issues' + +description: 'Closes Issues' + +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: Generate access token + uses: tibdex/github-app-token@v2 + if: ${{ steps.extract_branch.outputs.branch != ''}} + id: generate-token + with: + app_id: ${{ secrets.AUTOMATION_APP_ID }} + private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} + + - if: ${{ steps.extract_branch.outputs.branch != ''}} + 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: ${{ steps.extract_branch.outputs.branch != ''}} + 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 949b0c8673..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: @@ -6,7 +6,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - 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/branch-regex@reusable-github-actions + with: + 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-*" \ No newline at end of file diff --git a/.github/workflows/pick-to-staging.yml b/.github/workflows/pick-to-staging.yml index 7191ed4d14..a4a779d77e 100644 --- a/.github/workflows/pick-to-staging.yml +++ b/.github/workflows/pick-to-staging.yml @@ -1,66 +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 - milestone: 4 + - 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-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..70d8ca29a9 --- /dev/null +++ b/.github/workflows/reusable-pull-request-workflow.yml @@ -0,0 +1,91 @@ +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 + 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: ${{ 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-service: + name: Create PR for Staging (Service) + 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: "main" + + + create-pr-for-staging-main: + 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 (Done on PR closed) + 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 (WIP on PR opened) + 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 (ReviewIP on PR review_requested) + 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/.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 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/VERSION b/VERSION index 166f28a9bd..c0b0f22a1f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.2.8-dev +4.2.14 diff --git a/dev/actions/branch-regex/action.yml b/dev/actions/branch-regex/action.yml new file mode 100644 index 0000000000..6d69672fec --- /dev/null +++ b/dev/actions/branch-regex/action.yml @@ -0,0 +1,38 @@ +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' + value: ${{ steps.regex_export.outputs.match }} + +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: '${{ inputs.regex }}' + + - name: Export Regex Match + shell: bash + run: echo "match=${{ steps.regex_match.outputs.match }}" >> $GITHUB_OUTPUT + id: regex_export + + - name: Test outputs + shell: bash + run: echo "${{ steps.regex_export.outputs.match }}" + 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..d586db646a --- /dev/null +++ b/dev/actions/build-and-test-service/action-run.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +bash dev/run-tests.sh + 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..cbc8cb3bfc --- /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-service@all-in-one + with: + service: ${{ inputs.service }} + context: tests + - name: "Test Service" + shell: bash + run: bash $GITHUB_ACTION_PATH/action-run.sh 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/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/actions/project-automation/action.yml b/dev/actions/project-automation/action.yml new file mode 100644 index 0000000000..daf4b65089 --- /dev/null +++ b/dev/actions/project-automation/action.yml @@ -0,0 +1,30 @@ +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 + gh_app_installation_ID: + required: true + gh_app_secret_key: + required: true + +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/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/dev/scripts/git-fetch-and-merge-upstream.sh b/dev/scripts/git-fetch-and-merge-upstream.sh new file mode 100644 index 0000000000..c04fbf0ad8 --- /dev/null +++ b/dev/scripts/git-fetch-and-merge-upstream.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# Import OpenSlides utils package +. $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/util.sh + +# Fetches and merges all submodules with their respective upstream/main repositories. + +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 + 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 && \ + + # Recursively Update Meta too + update_meta && \ + + # Git commit + fetch_merge_push ${SUBMODULE} upstream +done +wait \ 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 d1aeb94b88..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-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" 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 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." 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 diff --git a/openslides-auth-service b/openslides-auth-service index afb7498a3d..cc3ef7759f 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit afb7498a3d305108b9707acdc21bd365ebfb9414 +Subproject commit cc3ef7759fdcbd72a8b2d56758d81f93c5994a7d diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 94135bf182..474bec4931 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 94135bf1821b6de8d4c2541e3701394c10045c97 +Subproject commit 474bec493122e62f70d0793920ac475fa91eee3f diff --git a/openslides-backend b/openslides-backend index 866b89378f..43c256eaf4 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit 866b89378f052eeef84db58f371a7f31c513d61c +Subproject commit 43c256eaf4b21b5bc28d6d00ad4f5f1947ce3326 diff --git a/openslides-client b/openslides-client index 61ce4217f5..dc87c78054 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit 61ce4217f5351e1451e464ebc3a417dd94703d05 +Subproject commit dc87c780542a0f7daba5c5460c32d011f451d304 diff --git a/openslides-datastore-service b/openslides-datastore-service index 749429e1cd..4fe62463f0 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit 749429e1cd742c7884e5f56d88704274a9f83332 +Subproject commit 4fe62463f0a1c5dc33a066017d52d14f52049894 diff --git a/openslides-icc-service b/openslides-icc-service index 0b9c6d5b13..188c6de328 160000 --- a/openslides-icc-service +++ b/openslides-icc-service @@ -1 +1 @@ -Subproject commit 0b9c6d5b13286d81f2c19a5802259be981bd3a21 +Subproject commit 188c6de328fe56ce4b79bb3258d670ae83f7e0bb diff --git a/openslides-manage-service b/openslides-manage-service index 40062fca20..e0627b25e3 160000 --- a/openslides-manage-service +++ b/openslides-manage-service @@ -1 +1 @@ -Subproject commit 40062fca20651939174d71b0e68c9be50e3fabee +Subproject commit e0627b25e33ee5763e27a27e5f479b20786bef5e diff --git a/openslides-media-service b/openslides-media-service index 296057104e..360ea01f71 160000 --- a/openslides-media-service +++ b/openslides-media-service @@ -1 +1 @@ -Subproject commit 296057104e1892d87f4cdb5d5478eacd721f745f +Subproject commit 360ea01f715a511bb67b7065c4cc65fb1627a4d8 diff --git a/openslides-proxy b/openslides-proxy index 0a9514cedf..480f9c4010 160000 --- a/openslides-proxy +++ b/openslides-proxy @@ -1 +1 @@ -Subproject commit 0a9514cedfde1676f6c67b1e6d27ac5c6ea0a194 +Subproject commit 480f9c4010f347bf6c1436a29b2eaf5d2bd7baaf diff --git a/openslides-search-service b/openslides-search-service index 35dbc4cd9a..20cd805b44 160000 --- a/openslides-search-service +++ b/openslides-search-service @@ -1 +1 @@ -Subproject commit 35dbc4cd9aa21608ffd97f4fb20b01e07f270b3f +Subproject commit 20cd805b44d7ec8b6247f6f3952d8672818728d7 diff --git a/openslides-vote-service b/openslides-vote-service index 448d52a24f..7443faf8a0 160000 --- a/openslides-vote-service +++ b/openslides-vote-service @@ -1 +1 @@ -Subproject commit 448d52a24f6d34958cd26ece11e544dce1d7bbc9 +Subproject commit 7443faf8a035a5a6c83e5a120fedfd8dbd301857 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. 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. 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 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 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.