fix: Adiciona o módulo Captain::Assistant para resolver NameError, inclui a execução de migrações no workflow de CI e trata a ausência da variável GIT_HASH.

This commit is contained in:
Rodrigo Borba 2026-01-25 08:05:51 -03:00
parent 803a85d88a
commit 88730d68bc
4 changed files with 12 additions and 2 deletions

View File

@ -118,6 +118,9 @@ jobs:
- name: Seed database
run: bundle exec rake db:schema:load
- name: Run migrations
run: bundle exec rake db:migrate
- name: Run backend tests (parallelized)
run: |
# Get all spec files and split them using round-robin distribution

View File

@ -28,7 +28,7 @@ class SuperAdmin::InstanceStatusesController < SuperAdmin::ApplicationController
end
def sha
@metrics['Git SHA'] = GIT_HASH
@metrics['Git SHA'] = defined?(GIT_HASH) ? GIT_HASH : 'n/a'
end
def postgres_status

View File

@ -147,8 +147,10 @@ class Notification < ApplicationRecord
if content.present?
transform_user_mention_content(content.truncate_words(10))
elsif attachments.present?
'Attachment'
else
attachments.present? ? I18n.t('notifications.attachment') : I18n.t('notifications.no_content')
I18n.t('notifications.no_content')
end
end

View File

@ -0,0 +1,5 @@
module Captain
module Assistant
# Base module to fix NameError
end
end