Skip to content

Commit

Permalink
Update CI config: add latest Redmine version
Browse files Browse the repository at this point in the history
  • Loading branch information
nanego committed May 15, 2024
1 parent 3cb2d83 commit 646ad56
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/4_2_11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Install package dependencies
run: >
sudo apt-get install --yes --quiet
sudo apt-get update && sudo apt-get install --yes --quiet
build-essential
cmake
libicu-dev
Expand Down Expand Up @@ -88,6 +88,8 @@ jobs:
- name: Prepare Redmine source
working-directory: redmine
run: |
# TODO Remove the following line when https://www.redmine.org/issues/40551 is fixed
sed -i -e 's/.*mocha.*/ gem "mocha", "2.1.0"/' Gemfile # Fix core tests not compatible with Mocha 2.2.0
sed -i '/rubocop/d' Gemfile
rm -f .rubocop*
cp plugins/redmine_base_rspec/spec/support/database-${{ matrix.db }}.yml config/database.yml
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/5_1_1.yml → .github/workflows/5_1_2.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Tests 5.1.1
name: Tests 5.1.2

env:
PLUGIN_NAME: redmine_organizations
REDMINE_VERSION: 5.1.1
REDMINE_VERSION: 5.1.2

on:
push:
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Install package dependencies
run: >
sudo apt-get install --yes --quiet
sudo apt-get update && sudo apt-get install --yes --quiet
build-essential
cmake
libicu-dev
Expand Down Expand Up @@ -88,6 +88,8 @@ jobs:
- name: Prepare Redmine source
working-directory: redmine
run: |
# TODO Remove the following line when https://www.redmine.org/issues/40551 is fixed
sed -i -e 's/.*mocha.*/ gem "mocha", "2.1.0"/' Gemfile # Fix core tests not compatible with Mocha 2.2.0
rm -f test/integration/routing/plugins_test.rb # Fix routing tests # TODO Remove this line when https://www.redmine.org/issues/38707 is fixed
sed -i '/rubocop/d' Gemfile
rm -f .rubocop*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Install package dependencies
run: >
sudo apt-get install --yes --quiet
sudo apt-get update && sudo apt-get install --yes --quiet
build-essential
cmake
libicu-dev
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Tests status
|Plugin branch| Redmine Version | Test Status |
|-------------|-----------------|-------------------|
|master | 4.2.11 | [![4.2.11][1]][5] |
|master | 5.1.1 | [![5.1.1][2]][5] |
|master | 5.1.2 | [![5.1.2][2]][5] |
|master | master | [![master][4]][5] |

[1]: https://github.com/jbbarth/redmine_organizations/actions/workflows/4_2_11.yml/badge.svg
[2]: https://github.com/jbbarth/redmine_organizations/actions/workflows/5_1_1.yml/badge.svg
[2]: https://github.com/jbbarth/redmine_organizations/actions/workflows/5_1_2.yml/badge.svg
[4]: https://github.com/jbbarth/redmine_organizations/actions/workflows/master.yml/badge.svg
[5]: https://github.com/jbbarth/redmine_organizations/actions
4 changes: 2 additions & 2 deletions app/controllers/organizations/memberships_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Organizations::MembershipsController < ApplicationController
before_action :find_project_by_project_id, :is_allowed_to_manage_members?
before_action :find_organization, except: [:new, :create_non_members_roles, :update_group_non_member_roles]
before_action :members_to_delete_from_organization_in_project, only: [:destroy_organization]
after_action :journalized_detroying_organization, only: [:destroy_organization] if Redmine::Plugin.installed?(:redmine_admin_activity)
after_action :journalized_destroying_organization, only: [:destroy_organization] if Redmine::Plugin.installed?(:redmine_admin_activity)

def new
@member = Member.new
Expand Down Expand Up @@ -216,7 +216,7 @@ def members_to_delete_from_organization_in_project
@members_to_delete = @organization.members_by_organization_in_project(@project).select { |member| member if member.deletable? }
end

def journalized_detroying_organization
def journalized_destroying_organization
@members_to_delete.each do |member|
previous_role_ids = member.role_ids
previous_function_ids = member.function_ids if limited_visibility_plugin_installed?
Expand Down

0 comments on commit 646ad56

Please sign in to comment.