API-GitForge
view release on metacpan or search on metacpan
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
API::GitForge -- functions to create objects which do
API::GitForge::Role::GitForge
API::GitForge::Role::GitForge -- all the generic operations against git forges
we currently support, such as forking a
repository into your own namespace
git-clean-forge-fork -- create tidy forks for pull requests
git-clean-forge-repo -- create repos on git forges with optional
features disabled
git-nuke-forge-fork -- delete forks created by git-clean-forge-fork(1)
INSTALLATION
To install this module, run the following commands:
% perl Makefile.PL
% make
% make test
bin/git-clean-forge-repo view on Meta::CPAN
#!/usr/bin/perl
# PODNAME: git-clean-forge-repo
# ABSTRACT: create repos on git forges with optional features disabled
#
# Copyright (C) 2017, 2020 Sean Whitton
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
bin/git-clean-forge-repo view on Meta::CPAN
exit App::git::clean_forge_repo->main;
__END__
=pod
=encoding UTF-8
=head1 NAME
git-clean-forge-repo - create repos on git forges with optional features disabled
=head1 VERSION
version 0.007
=head1 SYNOPSIS
B<git clean-forge-repo> [B<--remote=>I<REMOTE>]
=head1 DESCRIPTION
Creates repos on git forges like GitHub and GitLab, and disables all
optional features of those forges. Useful for when you want to use
the forge only as an ordinary git host, and nothing more.
=head1 OPTIONS
=over 4
=item B<--remote=>I<REMOTE>
Specify the name of the git remote you will use to push changes to the
repository created by this script. You should already have created
lib/API/GitForge/Role/GitForge.pm view on Meta::CPAN
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
lib/API/GitForge/Role/GitForge.pm view on Meta::CPAN
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.
lib/App/git/clean_forge_repo.pm view on Meta::CPAN
package App::git::clean_forge_repo;
# ABSTRACT: create repos on git forges with optional features disabled
#
# Copyright (C) 2020 Sean Whitton <spwhitton@spwhitton.name>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
lib/App/git/clean_forge_repo.pm view on Meta::CPAN
sub exit { $exit_main = shift // 0; goto EXIT_MAIN }
__END__
=pod
=encoding UTF-8
=head1 NAME
App::git::clean_forge_repo - create repos on git forges with optional features disabled
=head1 VERSION
version 0.007
=head1 FUNCTIONS
=head2 main
Implementation of git-clean-forge-repo(1). Please see documentation
( run in 0.289 second using v1.01-cache-2.11-cpan-4d50c553e7e )