| 1 | package WWW::Gitea::Repo; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: Gitea repository 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 | 0 | ▶ | sub id { $_[0]->data->{id} } | ||||||||
|
Subroutine
id: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 23 | 1 | ▶ | sub name { $_[0]->data->{name} } | ||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 24 | 1 | ▶ | sub full_name { $_[0]->data->{full_name} } | ||||||||
|
Subroutine
full_name: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 25 | 0 | ▶ | sub description { $_[0]->data->{description} } | ||||||||
|
Subroutine
description: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 26 | 0 | ▶ | sub private { $_[0]->data->{private} } | ||||||||
|
Subroutine
private: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 27 | 0 | ▶ | sub fork { $_[0]->data->{fork} } | ||||||||
|
Subroutine
fork: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 28 | 0 | ▶ | sub html_url { $_[0]->data->{html_url} } | ||||||||
|
Subroutine
html_url: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 29 | 0 | ▶ | sub clone_url { $_[0]->data->{clone_url} } | ||||||||
|
Subroutine
clone_url: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 30 | 0 | ▶ | sub ssh_url { $_[0]->data->{ssh_url} } | ||||||||
|
Subroutine
ssh_url: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 31 | 1 | ▶ | sub default_branch { $_[0]->data->{default_branch} } | ||||||||
|
Subroutine
default_branch: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 32 | 1 | ▶ | sub stars_count { $_[0]->data->{stars_count} } | ||||||||
|
Subroutine
stars_count: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 33 | 0 | ▶ | sub forks_count { $_[0]->data->{forks_count} } | ||||||||
|
Subroutine
forks_count: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 34 | 0 | ▶ | sub open_issues_count { $_[0]->data->{open_issues_count} } | ||||||||
|
Subroutine
open_issues_count: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 35 | |||||||||||
| 36 | 1 | ▶ | sub owner_login { | ||||||||
|
Subroutine
owner_login: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 37 | 1 | my ($self) = @_; | |||||||||
| 38 | 1 | my $o = $self->data->{owner}; | |||||||||
| 39 | 1 | ▶ | return $o ? $o->{login} : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | |||||||||||
| 43 | 0 | ▶ | sub refresh { | ||||||||
|
Subroutine
refresh: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 44 | 0 | my ($self) = @_; | |||||||||
| 45 | 0 | my $fresh = $self->_client->repos->get($self->owner_login, $self->name); | |||||||||
| 46 | 0 | $self->data($fresh->data); | |||||||||
| 47 | 0 | return $self; | |||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | |||||||||||
| 51 | 0 | ▶ | sub delete { | ||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 52 | 0 | my ($self) = @_; | |||||||||
| 53 | 0 | return $self->_client->repos->delete($self->owner_login, $self->name); | |||||||||
| 54 | } | ||||||||||
| 55 | |||||||||||
| 56 | |||||||||||
| 57 | 0 | ▶ | sub issues { | ||||||||
|
Subroutine
issues: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 58 | 0 | my ($self, %query) = @_; | |||||||||
| 59 | 0 | return $self->_client->issues->list($self->owner_login, $self->name, %query); | |||||||||
| 60 | } | ||||||||||
| 61 | |||||||||||
| 62 | |||||||||||
| 63 | 0 | ▶ | sub create_issue { | ||||||||
|
Subroutine
create_issue: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 64 | 0 | my ($self, %args) = @_; | |||||||||
| 65 | 0 | return $self->_client->issues->create($self->owner_login, $self->name, %args); | |||||||||
| 66 | } | ||||||||||
| 67 | |||||||||||
| 68 | |||||||||||
| 69 | 0 | ▶ | sub pulls { | ||||||||
|
Subroutine
pulls: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 70 | 0 | my ($self, %query) = @_; | |||||||||
| 71 | 0 | return $self->_client->pulls->list($self->owner_login, $self->name, %query); | |||||||||
| 72 | } | ||||||||||
| 73 | |||||||||||
| 74 | |||||||||||
| 75 | 0 | ▶ | sub labels { | ||||||||
|
Subroutine
labels: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 76 | 0 | my ($self) = @_; | |||||||||
| 77 | 0 | return $self->_client->labels->list($self->owner_login, $self->name); | |||||||||
| 78 | } | ||||||||||
| 79 | |||||||||||
| 80 | |||||||||||
| 81 | 0 | ▶ | sub milestones { | ||||||||
|
Subroutine
milestones: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 82 | 0 | my ($self, %query) = @_; | |||||||||
| 83 | 0 | return $self->_client->milestones->list($self->owner_login, $self->name, %query); | |||||||||
| 84 | } | ||||||||||
| 85 | |||||||||||
| 86 | |||||||||||
| 87 | 0 | ▶ | sub releases { | ||||||||
|
Subroutine
releases: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 88 | 0 | my ($self, %query) = @_; | |||||||||
| 89 | 0 | return $self->_client->releases->list($self->owner_login, $self->name, %query); | |||||||||
| 90 | } | ||||||||||
| 91 | |||||||||||
| 92 | |||||||||||
| 93 | |||||||||||
| 94 | 5 | 1; | |||||||||
| 95 | |||||||||||
| 96 | __END__ | ||||||||||