App-GHPT
view release on metacpan or search on metacpan
lib/App/GHPT/WorkSubmitter/ChangedFilesFactory.pm view on Meta::CPAN
$error, $?;
}
return \@files;
}
has changed_files => (
is => 'ro',
isa => 'App::GHPT::WorkSubmitter::ChangedFiles',
lazy => 1,
builder => '_build_changed_files',
);
sub _build_changed_files ( $self, @ ) {
return $self->changed_files_class->new(
added_files => $self->_git_diff_file_list->{A} || [],
modified_files => $self->_git_diff_file_list->{M} || [],
deleted_files => $self->_git_diff_file_list->{D} || [],
all_files => $self->_all_files,
);
}
__PACKAGE__->meta->make_immutable;
1;
# ABSTRACT: Work out what files have changed in the git branch
__END__
=pod
=encoding UTF-8
=head1 NAME
App::GHPT::WorkSubmitter::ChangedFilesFactory - Work out what files have changed in the git branch
=head1 VERSION
version 2.000001
=head1 SYNOPSIS
=head1 DESCRIPTION
Builds a L<App::GHPT::WorkSubmitter::ChangedFiles> from the git repo. Only concerns
itself with things that have been committed, doesn't care about what's in the
working directory at all.
Used by L<App::GHPT::WorkSubmitter::AskPullRequestQuestions>.
=for test_synopsis use v5.20;
my $factory = App::GHPT::WorkSubmitter::ChangedFilesFactory->new(
merge_to_branch_name => 'main',
);
my $changed_files = $factory->changed_files;
say 'The files that were added or modified since branching are:';
say for $changed_files->changed_files;
=head1 SUPPORT
Bugs may be submitted through L<https://github.com/maxmind/App-GHPT/issues>.
=head1 AUTHORS
=over 4
=item *
Mark Fowler <mark@twoshortplanks.com>
=item *
Dave Rolsky <autarch@urth.org>
=back
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2022 by MaxMind, Inc.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
=cut
( run in 0.420 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )