jbox-web/redmine_git_hosting

View on GitHub
lib/redmine_git_hosting/gitolite_wrappers/users/resync_ssh_keys.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module RedmineGitHosting
  module GitoliteWrappers
    module Users
      class ResyncSshKeys < GitoliteWrappers::Base
        def call
          admin.transaction do
            GitolitePublicKey.all.each do |ssh_key|
              create_gitolite_key ssh_key
              gitolite_admin_repo_commit "Add SSH key : #{ssh_key.identifier}"
            end
          end
        end
      end
    end
  end
end