Skip to content

Commit 9ab369d

Browse files
committed
Release OpenProject 15.4.0
2 parents 57aec88 + 2308557 commit 9ab369d

File tree

3,277 files changed

+67183
-29402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,277 files changed

+67183
-29402
lines changed

Diff for: .editorconfig

-4
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,7 @@ ij_json_spaces_within_brackets = false
350350
ij_json_wrap_long_lines = false
351351

352352
[{rcov,spec,rake,rails,spork,capfile,gemfile,rakefile,guardfile,isolate,vagrantfile,Puppetfile,*.jbuilder,*.rbw,*.gemspec,*.thor,*.ru,*.rb,*.rake}]
353-
indent_size = 2
354-
tab_width = 2
355353
trim_trailing_whitespace=true
356-
ij_continuation_indent_size = 2
357354
ij_ruby_align_group_field_declarations = false
358355
ij_ruby_align_multiline_parameters = true
359356
ij_ruby_blank_lines_around_method = 1
@@ -364,7 +361,6 @@ ij_ruby_indent_protected_methods = false
364361
ij_ruby_indent_public_methods = false
365362
ij_ruby_indent_when_cases = false
366363
ij_ruby_keep_blank_lines_in_declarations = 2
367-
ij_ruby_keep_indents_on_empty_lines = false
368364
ij_ruby_keep_line_breaks = true
369365
ij_ruby_parentheses_around_method_arguments = true
370366
ij_ruby_spaces_around_hashrocket = true

Diff for: .erb-lint.yml renamed to .erb_lint.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ linters:
1515
rubocop_config:
1616
inherit_from:
1717
- .rubocop.yml
18+
Layout/CommentIndentation:
19+
Enabled: false
20+
Layout/FirstArgumentIndentation:
21+
EnforcedStyle: consistent
22+
Layout/FirstMethodArgumentLineBreak:
23+
Enabled: true
1824
Layout/InitialIndentation:
1925
Enabled: false
2026
Layout/LeadingEmptyLines:
@@ -25,11 +31,13 @@ linters:
2531
Enabled: false
2632
Layout/TrailingWhitespace:
2733
Enabled: false
34+
Lint/UselessAssignment:
35+
Enabled: false
2836
Naming/FileName:
2937
Enabled: false
38+
Rails/OutputSafety:
39+
Enabled: true
3040
Style/FrozenStringLiteralComment:
3141
Enabled: false
32-
Lint/UselessAssignment:
42+
Style/RedundantConstantBase:
3343
Enabled: false
34-
Rails/OutputSafety:
35-
Enabled: true

Diff for: .github/dangerfiles/release_migrations/Dangerfile

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# frozen_string_literal: true
2+
3+
#-- copyright
4+
# OpenProject is an open source project management software.
5+
# Copyright (C) the OpenProject GmbH
6+
#
7+
# This program is free software; you can redistribute it and/or
8+
# modify it under the terms of the GNU General Public License version 3.
9+
#
10+
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
11+
# Copyright (C) 2006-2013 Jean-Philippe Lang
12+
# Copyright (C) 2010-2013 the ChiliProject Team
13+
#
14+
# This program is free software; you can redistribute it and/or
15+
# modify it under the terms of the GNU General Public License
16+
# as published by the Free Software Foundation; either version 2
17+
# of the License, or (at your option) any later version.
18+
#
19+
# This program is distributed in the hope that it will be useful,
20+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
21+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22+
# GNU General Public License for more details.
23+
#
24+
# You should have received a copy of the GNU General Public License
25+
# along with this program; if not, write to the Free Software
26+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27+
#
28+
# See COPYRIGHT and LICENSE files for more details.
29+
#++
30+
CORE_OR_MODULE_MIGRATIONS_REGEX = %r{(modules/.*)?db/migrate/.*\.rb}
31+
32+
def added_or_modified_migrations
33+
(git.modified_files + git.added_files).grep(CORE_OR_MODULE_MIGRATIONS_REGEX)
34+
end
35+
36+
if github.branch_for_base.match?(/^release/) && added_or_modified_migrations.any?
37+
warn "This PR has migration-related changes on a release branch. Ping @opf/operations"
38+
end

Diff for: .github/dangerfiles/user_references/Dangerfile

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# frozen_string_literal: true
2+
3+
#-- copyright
4+
# OpenProject is an open source project management software.
5+
# Copyright (C) the OpenProject GmbH
6+
#
7+
# This program is free software; you can redistribute it and/or
8+
# modify it under the terms of the GNU General Public License version 3.
9+
#
10+
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
11+
# Copyright (C) 2006-2013 Jean-Philippe Lang
12+
# Copyright (C) 2010-2013 the ChiliProject Team
13+
#
14+
# This program is free software; you can redistribute it and/or
15+
# modify it under the terms of the GNU General Public License
16+
# as published by the Free Software Foundation; either version 2
17+
# of the License, or (at your option) any later version.
18+
#
19+
# This program is distributed in the hope that it will be useful,
20+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
21+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22+
# GNU General Public License for more details.
23+
#
24+
# You should have received a copy of the GNU General Public License
25+
# along with this program; if not, write to the Free Software
26+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27+
#
28+
# See COPYRIGHT and LICENSE files for more details.
29+
#++
30+
31+
MIGRATIONS_REGEX = %r{db/migrate/.*\.rb}
32+
USER_REFERENCE_REGEX = /(?:belongs_to\s+:user|references\s+:users?|to_table:\s*:users?|table_name:\s*["']users?["'])/i
33+
34+
def added_or_modified_migrations?
35+
(git.modified_files + git.added_files).grep(MIGRATIONS_REGEX)
36+
end
37+
38+
def files_with_user_references
39+
files = {}
40+
41+
# Check migrations
42+
added_or_modified_migrations?.each do |file|
43+
content = File.read(file)
44+
if content.match?(USER_REFERENCE_REGEX)
45+
files[file] = "migration with user reference"
46+
end
47+
end
48+
49+
files
50+
end
51+
52+
# Check for user references in migrations and models
53+
files_with_references = files_with_user_references
54+
if files_with_references.any?
55+
warning_message = ["Attention developer & reviewer: Files with potential user references found:"]
56+
57+
files_with_references.each do |file, type|
58+
warning_message << "- #{file} (#{type})"
59+
end
60+
61+
job_link = github.html_link("app/workers/principals/delete_job.rb")
62+
replacement_service = github.html_link("app/services/principals/replace_references_service.rb")
63+
replacements = github.html_link("config/initializers/replace_references_service.rb")
64+
65+
warning_message << <<~EOS
66+
67+
**Please make sure:**
68+
69+
1. You've added proper relationships (has_many, belongs_to, ...) and their inverse in your models
70+
2. You deal with model destruction dependencies: `dependent: :destroy` or `dependent: :delete_all`
71+
3. You add behavior and tests for the Principal::DeleteJob (#{job_link})
72+
4. You replace references to users with deleted user in Principal::ReplaceReferencesService (#{replacement_service}) by adding to the replacements initailizer (#{replacements}) for the core, or using the `replace_principal_references` helper in modules/plugins.
73+
5. You test the above behaviors with an integration test (e.g., [like this one](https://github.com/opf/openproject/blob/dev/modules/meeting/spec/services/principals/replace_references_service_call_integration_spec.rb) to confirm deletion of users is possible.
74+
75+
This helps prevent dangling database objects when users are deleted and resulting bugs.
76+
EOS
77+
78+
79+
warn warning_message.join("\n")
80+
end

Diff for: .github/dependabot.yml

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ updates:
2121
target-branch: "dev"
2222
open-pull-requests-limit: 3
2323
versioning-strategy: lockfile-only
24+
groups:
25+
aws-gems:
26+
patterns:
27+
- "aws-*"
2428
- package-ecosystem: "github-actions"
2529
directory: "/"
2630
schedule:

Diff for: .github/workflows/danger.yml

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
name: migration-warning-on-release-branches
1+
name: Dangerfile
22

33
on:
44
pull_request:
5-
branches:
6-
- release/*
7-
paths:
8-
- 'db/migrate/**.rb'
9-
- 'modules/**/db/migrate/*.rb'
5+
types: [opened, reopened, synchronize]
6+
paths-ignore:
7+
- 'docs/**'
8+
- 'help/**'
9+
- 'packaging/**'
10+
- '.pkgr.yml'
1011

1112
jobs:
1213
danger:
@@ -15,12 +16,17 @@ jobs:
1516
timeout-minutes: 10
1617
steps:
1718
- uses: actions/checkout@v4
18-
- uses: ruby/setup-ruby@v1
1919
with:
20-
ruby-version: '3.4.1'
21-
- uses: MeilCli/danger-action@v6
20+
fetch-depth: 0
21+
- uses: ruby/setup-ruby@v1
2222
with:
23-
danger_file: 'Dangerfile'
24-
danger_id: 'danger-pr'
23+
ruby-version: .ruby-version
24+
bundler-cache: true
25+
- name: Setup danger
26+
run: |
27+
gem install danger
28+
- name: Run inconsistent translations check
2529
env:
2630
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: |
32+
danger --verbose

Diff for: .github/workflows/docker.yml

-5
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ jobs:
133133
bim_support: false
134134
target: all-in-one
135135
runner: runner=4cpu-linux-arm64
136-
- platform: linux/ppc64le
137-
digest: ppc-aio
138-
bim_support: false
139-
target: all-in-one
140-
runner: runner=4cpu-linux-x64
141136
steps:
142137
- name: Checkout
143138
uses: actions/checkout@v4

Diff for: .rubocop.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
require:
22
- rubocop-openproject
3-
- rubocop-rails
4-
- rubocop-rspec
53
- rubocop-rspec_rails
64
- rubocop-capybara
75
- rubocop-factory_bot
8-
- rubocop-performance
96
- ./config/initializers/inflections.rb
107

11-
<% if File.exist?('.rubocop-local.yml') %>
8+
plugins:
9+
- rubocop-rails
10+
- rubocop-rspec
11+
- rubocop-performance
12+
13+
# A rubocop-local.yml file can be added to customized the styles
1214
inherit_from:
13-
- .rubocop-local.yml
14-
<% end %>
15+
- .rubocop-local*.yml
1516

1617
inherit_mode:
1718
merge:

Diff for: .ruby-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.1
1+
3.4.2

Diff for: Dangerfile

+30-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
1-
CORE_OR_MODULE_MIGRATIONS_REGEX = %r{(modules/.*)?db/migrate/.*\.rb}
1+
# frozen_string_literal: true
22

3-
def added_or_modified_migrations?
4-
(git.modified_files + git.added_files).grep(CORE_OR_MODULE_MIGRATIONS_REGEX)
5-
end
6-
7-
if added_or_modified_migrations?
8-
warn "This PR has migration-related changes on a release branch. Ping @opf/operations"
9-
end
3+
#-- copyright
4+
# OpenProject is an open source project management software.
5+
# Copyright (C) the OpenProject GmbH
6+
#
7+
# This program is free software; you can redistribute it and/or
8+
# modify it under the terms of the GNU General Public License version 3.
9+
#
10+
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
11+
# Copyright (C) 2006-2013 Jean-Philippe Lang
12+
# Copyright (C) 2010-2013 the ChiliProject Team
13+
#
14+
# This program is free software; you can redistribute it and/or
15+
# modify it under the terms of the GNU General Public License
16+
# as published by the Free Software Foundation; either version 2
17+
# of the License, or (at your option) any later version.
18+
#
19+
# This program is distributed in the hope that it will be useful,
20+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
21+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22+
# GNU General Public License for more details.
23+
#
24+
# You should have received a copy of the GNU General Public License
25+
# along with this program; if not, write to the Free Software
26+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27+
#
28+
# See COPYRIGHT and LICENSE files for more details.
29+
#++
30+
danger.import_dangerfile(path: ".github/dangerfiles/user_references/Dangerfile")
31+
danger.import_dangerfile(path: ".github/dangerfiles/release_migrations/Dangerfile")

0 commit comments

Comments
 (0)