API-GitForge
view release on metacpan or search on metacpan
lib/API/GitForge/Role/GitForge.pm view on Meta::CPAN
$self->_ensure_fork_branch_unprotected($_[0], $_) for @fork_branches;
}
# may fail if we couldn't unprotect; that's okay
eval { $git->push($fork_uri, "--delete", @fork_branches) };
return $fork_uri;
}
sub nuke_fork { shift->_nuke_fork(@_) }
sub clean_config_repo { shift->_clean_config_repo(@_) }
sub clean_config_fork { shift->_clean_config_fork(@_) }
requires
qw<_make_api _ensure_repo _clean_config_repo _clean_config_fork
_ensure_fork _nuke_fork>;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
API::GitForge::Role::GitForge - role implementing generic git forge operations
=head1 VERSION
version 0.007
=head1 DESCRIPTION
Operations which one might wish to perform against any git forge. See
L<API::GitForge>.
In this documentation, C<example.com> should be replaced with the
domain at which your git forge is hosted, e.g. C<salsa.debian.org>.
=head1 METHODS
=head2 new(domain => $domain, access_token => $token)
Instantiate an object representing the GitForge at C<$domain>. The
C<access_key> argument is optional; if present, it should be an API
key for the forge.
=head2 ensure_repo($repo)
Create a new repo at C<https://example.com/$repo>.
=head2 clean_repo($repo)
Create a new repo at C<https://example.com/$repo> and turn off
optional forge features.
=head2 ensure_fork($upstream)
Ensure that the current user has a fork of the repo at
C<https://example.com/$upstream>, and return URI to that fork suitable
for adding as a git remote.
=head2 clean_fork($upstream)
Ensure that the current user has a fork of the repo at
C<https://example.com/$upstream>, config that fork to make it obvious
it's only there for submitting change proposals, and return URI to
fork suitable for adding as a git remote.
=head2 nuke_fork($upstream)
Delete the user's fork of the repo at
C<https://example.com/$upstream>.
=head2 clean_config_repo($repo)
Turn off optional forge features for repo at
C<https://example.com/$repo>.
=head2 clean_config_fork($upstream)
Configure user's fork of repo at C<https://example.com/$upstream> to
make it obvious that it's only there for submitting change proposals.
=head1 STATUS
Unstable. Interface may change.
=head1 AUTHOR
Sean Whitton <spwhitton@spwhitton.name>
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2017, 2020 by Sean Whitton <spwhitton@spwhitton.name>.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
=cut
( run in 0.556 second using v1.01-cache-2.11-cpan-39bf76dae61 )