summaryrefslogtreecommitdiff
path: root/bin/git-clean-forge-repo
blob: 57afb140d25a3e61a2f8b10b41804015e838e7e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

=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
this git remote; see "EXAMPLE" below.  Defaults to "origin".

=back

=head1 EXAMPLE

=over 4

    % git init
    % # work on new project
    % git remote add origin https://salsa.debian.org/spwhitton/foo
    % git clean-forge-repo
    % git push -u origin master

=back

=head1 FILES

=over 4

=item $XDG_CONFIG_HOME/.config/gitforge/access_tokens/I<DOMAIN>

Where I<DOMAIN> is the domain name of the git forge
(e.g. "github.com", "salsa.debian.org"), this file should contain an
API access token to log in to your account at the git forge.  If
unset, $XDG_CONFIG_HOME defaults to ~/.config.

=back

=head1 SEE ALSO

git-clean-forge-fork(1)

=cut

use App::git::clean_forge_repo;
exit App::git::clean_forge_repo->main;