App-GitGot

 view release on metacpan or  search on metacpan

bin/git-got  view on Meta::CPAN

    # the current working directory
    got fork https://github.com/somebodies/repo_name

    # note: the default path to a repo added via 'fork' is a directory
    # named 'repo_name' in the current working directory

    # if you just want to fork without checking out a working copy:
    got fork --noclone https://github.com/somebodies/repo_name

    # finally, please note that you need a C<~/.github-identity> file set up
    # with your access token or your username and password in the following key-value
    # format:
    user username
    pass password

    # *OR*
    access_token token

    # note that if you specify both, the access_token value will be used

    # show version of got
    got version

=head1 DESCRIPTION

bin/got  view on Meta::CPAN

    # the current working directory
    got fork https://github.com/somebodies/repo_name

    # note: the default path to a repo added via 'fork' is a directory
    # named 'repo_name' in the current working directory

    # if you just want to fork without checking out a working copy:
    got fork --noclone https://github.com/somebodies/repo_name

    # finally, please note that you need a C<~/.github-identity> file set up
    # with your access token or your username and password in the following key-value
    # format:
    user username
    pass password

    # *OR*
    access_token token

    # note that if you specify both, the access_token value will be used

    # show version of got
    got version

=head1 DESCRIPTION

lib/App/GitGot/Command/fork.pm  view on Meta::CPAN

    $config{$k} = $v;
  }

  if ( defined $config{access_token} ) {
    return ( access_token => $config{access_token} )
  }
  elsif ( defined $config{pass} and defined $config{user} ) {
    return ( login => $config{user} , pass => $config{pass} )
  }
  else {
    say STDERR "Couldn't parse password or access_token info from ~/.github-identity"
      and exit(1);
  }
}

sub _parse_github_url {
  my $url = shift;

  my( $owner , $repo ) = $url =~ m|/github.com/([^/]+)/([^/]+?)(?:\.git)?$|
    or say STDERR "ERROR: Can't parse '$url'.\nURL needs to be of the form 'github.com/OWNER/REPO'.\n"
    and exit(1);



( run in 0.614 second using v1.01-cache-2.11-cpan-49f99fa48dc )