Pithub/Repos/Actions/Workflows.pm

filter: Statementstmt 73.6% 14 / 19 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 2 / 2 totaltotal 74.0% 20 / 27 CC 2 SCAR 5.2
CC
2
Cov
71%
get
2.2
list
2.0
BEGIN
1.0
CRAP 1.7
« Pithub/Issues.pm ↑ Summary Pithub/GitData/Blobs.pm »
1 package Pithub::Repos::Actions::Workflows;
2 16 our $AUTHORITY = 'cpan:PLU';
3  
4 # ABSTRACT: Github v3 Repo Actions Workflows API
5  
6 16 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 16 our $VERSION = '0.01041';
9  
10 16 ▶use Carp qw( croak );
Subroutine BEGIN: called CC=1 SCAR=0.0
11 16 extends 'Pithub::Base';
12  
13  
14 sub get {
15 1 ▶ my ( $self, %args ) = @_;
Subroutine get: called CC=2 SCAR=7.9
Pod documented
16 1 my $param_name = 'workflow_id';
17 1 my $id = delete $args{$param_name};
18 1 ▶ croak 'Missing key in parameters: ' . $param_name unless $id;
Branch: 1 branch
BranchTrueFalseTotal
unless $id 1 0 1
19 0 $self->_validate_user_repo_args( \%args );
20 return $self->request(
21 method => 'GET',
22 path => sprintf(
23 '/repos/%s/%s/actions/workflows/%s', delete $args{user},
24 0 delete $args{repo}, $id,
25 ),
26 %args,
27 );
28 }
29  
30  
31 sub list {
32 0 ▶ my ( $self, %args ) = @_;
Subroutine list: not called CC=1 SCAR=6.9
Pod documented
33 0 $self->_validate_user_repo_args( \%args );
34 return $self->request(
35 method => 'GET',
36 path => sprintf(
37 '/repos/%s/%s/actions/workflows', delete $args{user},
38 delete $args{repo}
39 0 ),
40 %args,
41 );
42 }
43  
44 16 1;
45  
46 __END__
« Pithub/Issues.pm ↑ Summary Pithub/GitData/Blobs.pm »