Class: NdrDevSupport::RakeCI::CommitCop::ModifiedMigration

Inherits:
Object
  • Object
show all
Includes:
Deputisable
Defined in:
lib/ndr_dev_support/rake_ci/commit_cop/modified_migration.rb

Overview

This cop checks for modified migrations

Instance Method Summary collapse

Instance Method Details

#check(changes) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/ndr_dev_support/rake_ci/commit_cop/modified_migration.rb', line 10

def check(changes)
  return if changes[:modified].none?(&migration_file?)

  attachment(:danger,
             'Modified Migration',
             'Migrations should not be modified. Create another migration.')
end