App-GitHub-Repository

 view release on metacpan or  search on metacpan

lib/App/GitHub/Repository.pm  view on Meta::CPAN

    # These are tests that produce a TAP-parseable output.
    $repo->has_readme( "Has README" );
    $repo->has_file( ".gitignore", "Has .gitignore" );
    $repo->has_milestones( 1, "Correct number of milestones" );
    $repo->issues_well_closed( "Issues closed from a commit" );


=head1 DESCRIPTION

A series of sanity checks on GitHub repositories.


=head1 INTERFACE

=head2 new( $url, $tmp_dir = "/tmp" );

Creates object with repo URL. The directory can't be reused, it will croak if the directory already exists.

=head2 issues_well_closed

Checks that issues in the repo have been closed with a commit

=head2 has_milestones

Checks that the repo has has a minimum number of milestones open

=head2 has_readme

Checks that the README.md file is present in the checked out repo

=head2 has_file

Checks that the repository contains a specific file

=head2 get_github

Auxiliary function to get a file from GitHub

=head2 closes_from_commit( $issue_id )

Checks if an issue has been closed from a commit.


=head1 CONFIGURATION AND ENVIRONMENT


App::GitHub::Repository requires C<curl> to be installed.


=head1 DEPENDENCIES

The system needs to have C<curl> installed and available.

Use C<./Build installdeps> to install all dependencies>


=head1 INCOMPATIBILITIES

None reported.

=head1 BUGS AND LIMITATIONS

Please report any bugs or feature requests to
C<bug-app-github-repository@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org>.

=head1 CAVEATS

Will probably not work from GitHub actions, since they ban scraping from GitHub
runners. Use with care in any other environment, for the same reason.

=head1 AUTHOR

JJ Merelo  C<< <jjmerelo@gmail.com> >>


=head1 LICENCE AND COPYRIGHT

Copyright (c) 2018,2024, JJ Merelo C<< <jjmerelo@gmail.com> >>. All rights reserved.

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.


=head1 DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.



( run in 3.980 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )