Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge main into feature/relational db #98

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,20 @@ jobs:
- uses: actions/checkout@v4
with:
path: current-meta-repository
ref: ${{ github.ref_name }}

- uses: actions/checkout@v4
with:
repository: OpenSlides/${{ inputs.repository }}
repository: ${{ github.repository_owner }}/${{ inputs.repository }}
path: service-repository
ref: ${{ github.ref_name }}
fetch-depth: 0
submodules: true

- name: Checkout meta repository commit
working-directory: service-repository/.git/modules/openslides-meta/
run: git fetch origin && git checkout ${{ inputs.commit }}

- name: Update repository files
if: inputs.setup-action != ''
uses: jenseng/dynamic-uses@v1
Expand All @@ -60,8 +62,8 @@ jobs:
commit-message: Update meta repository
branch: dep/update-meta-repo
delete-branch: true
title: Update meta repository
body: "Triggered by commit [${{ inputs.commit }}](https://github.com/OpenSlides/openslides-meta/commit/${{ inputs.commit }})"
title: "Update meta repository (${{ github.ref_name }})"
body: "Triggered by commit [${{ inputs.commit }}](https://github.com/${{ github.repository_owner }}/openslides-meta/commit/${{ inputs.commit }})"
reviewers: ${{ inputs.assignee }}
assignees: ${{ inputs.assignee }}
labels: dependencies
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/create-prs-for-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- staging/4*

jobs:
create-pull-requests:
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/pick-to-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Cherry pick staging PRs merged into main

on:
pull_request:
types:
- closed
branches:
- 'main'


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

steps:
- name: Checkout main
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*' | tail -1 | awk 'gsub(".*refs/heads/","")')
git fetch origin $branch
git checkout $branch

- name: Set git credentials
run: |
git config --global user.name openslides-automation
git config --global user.email [email protected]

- 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: 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: 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
4 changes: 2 additions & 2 deletions dev/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
autoflake==2.3.1
black==24.4.1
black==24.4.2
flake8==7.0.0
isort==5.13.2
mypy==1.10.0
pytest==8.1.1
pytest==8.2.0
pyupgrade==3.15.2
pyyaml==6.0.1
simplejson==3.19.2
Expand Down
5 changes: 4 additions & 1 deletion models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ user:
- superadmin
- can_manage_organization
- can_manage_users
restriction_mode: E
restriction_mode: B
is_present_in_meeting_ids:
type: relation-list
to: meeting/present_user_ids
Expand Down Expand Up @@ -1447,6 +1447,9 @@ meeting:
users_forbid_delegator_as_supporter:
type: boolean
restriction_mode: B
users_forbid_delegator_to_vote:
type: boolean
restriction_mode: B

# Assignments
assignments_export_title:
Expand Down