Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix check for newer dangerfile

Oliver Günther41bde479b3d4
diff --git a/.github/dangerfiles/release_migrations/Dangerfile b/.github/dangerfiles/release_migrations/Dangerfile
index 3dae21f7b1a..eac459bd118 100644
--- a/.github/dangerfiles/release_migrations/Dangerfile
+++ b/.github/dangerfiles/release_migrations/Dangerfile
@@ -29,10 +29,10 @@
#++
CORE_OR_MODULE_MIGRATIONS_REGEX = %r{(modules/.*)?db/migrate/.*\.rb}
-def added_or_modified_migrations?
+def added_or_modified_migrations
(git.modified_files + git.added_files).grep(CORE_OR_MODULE_MIGRATIONS_REGEX)
end
-if github.branch_for_base.match?(/^release/) && added_or_modified_migrations?
+if github.branch_for_base.match?(/^release/) && added_or_modified_migrations.any?
warn "This PR has migration-related changes on a release branch. Ping @opf/operations"
end