Gitea/Release.pm

filter: Statementstmt 25.0% 11 / 44 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 9.0% 2 / 22 Podpod 100% 20 / 20 totaltotal 37.5% 33 / 88 CC 2 SCAR 8.2
CC
2
Cov
24%
author_login
6.0
id
2.0
tag_name
2.0
CRAP 2.3
« Gitea/Org.pm ↑ Summary Gitea/Issue.pm »
1 package WWW::Gitea::Release;
2  
3 # ABSTRACT: Gitea release entity
4  
5 5 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 5 has _client => (
10 is => 'ro',
11 required => 1,
12 weak_ref => 1,
13 init_arg => 'client',
14 );
15  
16 5 has data => (
17 is => 'rw',
18 required => 1,
19 );
20  
21  
22 5 has owner => ( is => 'ro' );
23 5 has repo => ( is => 'ro' );
24  
25  
26 0 ▶sub id { $_[0]->data->{id} }
Subroutine id: not called CC=1 SCAR=6.9
Pod documented
27 0 ▶sub tag_name { $_[0]->data->{tag_name} }
Subroutine tag_name: not called CC=1 SCAR=6.9
Pod documented
28 0 ▶sub name { $_[0]->data->{name} }
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
29 0 ▶sub body { $_[0]->data->{body} }
Subroutine body: not called CC=1 SCAR=6.9
Pod documented
30 0 ▶sub draft { $_[0]->data->{draft} }
Subroutine draft: not called CC=1 SCAR=6.9
Pod documented
31 0 ▶sub prerelease { $_[0]->data->{prerelease} }
Subroutine prerelease: not called CC=1 SCAR=6.9
Pod documented
32 0 ▶sub html_url { $_[0]->data->{html_url} }
Subroutine html_url: not called CC=1 SCAR=6.9
Pod documented
33 0 ▶sub tarball_url { $_[0]->data->{tarball_url} }
Subroutine tarball_url: not called CC=1 SCAR=6.9
Pod documented
34 0 ▶sub zipball_url { $_[0]->data->{zipball_url} }
Subroutine zipball_url: not called CC=1 SCAR=6.9
Pod documented
35 0 ▶sub created_at { $_[0]->data->{created_at} }
Subroutine created_at: not called CC=1 SCAR=6.9
Pod documented
36 0 ▶sub published_at { $_[0]->data->{published_at} }
Subroutine published_at: not called CC=1 SCAR=6.9
Pod documented
37 0 ▶sub author_login { my $a = $_[0]->data->{author}; $a ? $a->{login} : undef }
Subroutine author_login: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
$a ? : 0 0 0
38  
39  
40 0 ▶sub refresh {
Subroutine refresh: not called CC=1 SCAR=6.9
Pod documented
41 0 my ($self) = @_;
42 0 my $fresh = $self->_client->releases->get($self->owner, $self->repo, $self->id);
43 0 $self->data($fresh->data);
44 0 return $self;
45 }
46  
47  
48 0 ▶sub edit {
Subroutine edit: not called CC=1 SCAR=6.9
Pod documented
49 0 my ($self, %args) = @_;
50 0 my $fresh = $self->_client->releases->edit(
51 $self->owner, $self->repo, $self->id, %args);
52 0 $self->data($fresh->data);
53 0 return $self;
54 }
55  
56  
57 0 ▶sub delete {
Subroutine delete: not called CC=1 SCAR=6.9
Pod documented
58 0 my ($self) = @_;
59 0 return $self->_client->releases->delete($self->owner, $self->repo, $self->id);
60 }
61  
62  
63 0 ▶sub assets {
Subroutine assets: not called CC=1 SCAR=6.9
Pod documented
64 0 my ($self, %query) = @_;
65 0 return $self->_client->releases->assets(
66 $self->owner, $self->repo, $self->id, %query);
67 }
68  
69  
70 0 ▶sub create_asset {
Subroutine create_asset: not called CC=1 SCAR=6.9
Pod documented
71 0 my ($self, %args) = @_;
72 0 return $self->_client->releases->create_asset(
73 $self->owner, $self->repo, $self->id, %args);
74 }
75  
76  
77 0 ▶sub get_asset {
Subroutine get_asset: not called CC=1 SCAR=6.9
Pod documented
78 0 my ($self, $attachment_id) = @_;
79 0 return $self->_client->releases->get_asset(
80 $self->owner, $self->repo, $self->id, $attachment_id);
81 }
82  
83  
84 0 ▶sub edit_asset {
Subroutine edit_asset: not called CC=1 SCAR=6.9
Pod documented
85 0 my ($self, $attachment_id, %args) = @_;
86 0 return $self->_client->releases->edit_asset(
87 $self->owner, $self->repo, $self->id, $attachment_id, %args);
88 }
89  
90  
91 0 ▶sub delete_asset {
Subroutine delete_asset: not called CC=1 SCAR=6.9
Pod documented
92 0 my ($self, $attachment_id) = @_;
93 0 return $self->_client->releases->delete_asset(
94 $self->owner, $self->repo, $self->id, $attachment_id);
95 }
96  
97  
98  
99 5 1;
100  
101 __END__
« Gitea/Org.pm ↑ Summary Gitea/Issue.pm »