App-Changelord/lib/App/Changelord/Role/ChangeTypes.pm

26 lines
554 B
Perl

package App::Changelord::Role::ChangeTypes;
use v5.36.0;
use Moo::Role;
use feature 'try';
has change_types => (
is => 'lazy',
);
sub _build_change_types($self) {
no warnings;
return eval {
$self->changelog->{change_types};
} || [
{ title => 'Features' , level => 'minor', keywords => [ 'feat' ] } ,
{ title => 'Bug fixes' , level => 'patch', keywords => [ 'fix' ] },
{ title => 'Package maintenance' , level => 'patch', keywords => [ 'chore', 'maint', 'refactor' ] },
]
}
1;