Subject: | Method to change a repository |
gitpan needs to turn off the wiki and issues tabs on its repositories.
There's a Github API to do this, but Net::GitHub::V2::Repositories
doesn't support it. Here's code for that.
sub change_repo {
my $self = shift;
my %changes = map { +"values[$_]" => $changes{$_} } keys @_;
my $owner = $self->owner;
my $repo = $self->repo;
return $self->repos->get_json_to_obj_authed(
"repos/show/$owner/$repo",
%changes,
"repository"
);
}
There's not really space in the API to set the owner and repository.
The Net::GitHub::V2::Repositories API is inconsistent about them and I
always found it weird that they could be overridden per-method anyway.