Why not adopt me?
NAME
App::GHPT::WorkSubmitter::ChangedFiles - Contains all the files that were modified or added in a branch
VERSION
version 2.000001
SYNOPSIS
DESCRIPTION
A class that represents what files were added, modified or deleted in a branch, as well as what files exist in the branch.
Normally constructed by App::GHPT::WorkSubmitter::ChangedFilesFactory.
my $factory = App::GHPT::WorkSubmitter::ChangedFilesFactory->new(
merge_to_branch_name => 'main',
);
my $changed_files = $factory->changed_files;
# print out all modified / added file in this branch
say for $changed_files->changed_files->@*;
ATTRIBUTES
added_files
All files added in this branch.
Arrayref of String. Required.
modified_files
All files modified in this branch (excluding those that were added in this branch)
Arrayref of String. Required.
deleted_files
All files deleted in this branch.
Arrayref of String. Required.
all_files
All files in this branch (including those created before the branch was branched.) i.e. every file that you'd get from a fresh checkout of this branch.
Arrayref of String. Required.
METHODS
$changed->changed_files
All changed files (i.e. all files that were either added or modified in this branch.) Returns Arrayref of Strings.
$changed->changed_files_match( $regex )
Returns true iff any of the changed files filenames match the passed regex
$changed->changed_files_matching( $regex )
Returns a list of changed files filenames matching the passed regex
$changed->file_exists( $path )
Does the passed file exist on the branch (i.e. if you were to do a fresh checkout of this branch would the file be present)
$changed->file_status( $path )
Returns the file status. This is either A
(added), D
(deleted), M
(modified),
(exists, not modified) or undef (doesn't exist).
SUPPORT
Bugs may be submitted through https://github.com/maxmind/App-GHPT/issues.
AUTHORS
Mark Fowler <mark@twoshortplanks.com>
Dave Rolsky <autarch@urth.org>
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)