App-gh

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

       From @garu:
       > This patch does 3 things:
       > * Improves documentation on how to let "gh" see your authentication data;

       > * Fixes an "uninitialized" warning in App::gh::Utils::print_list(),
       > while also showing a (nicer, I think) "[no description available]"
       > message instead, quite similar to what github does on the web;

       > * Patches App::gh::API::request() to allow users without
       > authentication information in their .gitconfig to use "gh". This was
       > probably working before, but I think github updated the API and, if
       > you try to fetch data by posting the request with empty login/token
       > values, github returns 401 Forbidden instead of assuming anonymous.
       > With this patch, "gh" works for most commands even when the user
       > doesn't have a .gitconfig file.

       > I hope this helps!

       > (That said, I think you should really consider Net::GitHub for proper
       > Github API handling. For instance, the documents in develop.github.com
       > are pretty strict regarding what should be a GET request and what

lib/App/gh/Command/Import.pm  view on Meta::CPAN

        # FIXME: Update existing repo
        # my %args = (
        #     description => ($self->{description}
        #                         || $existing_gh_repo->{description} || ""),
        #     homepage => ($self->{homepage}
        #                      || $existing_gh_repo->{homepage} || "" ),
        #     # Don't change visibility of existing repo
        #     # public => $self->{private} ? 0 : 1 ,
        # );
        # my $ret = App::gh->api->repo_set_info( $gh_id, $reponame, %args );
        # print "Repository updated: \n";
    }
    else {
        # Create new repo
        App::gh->github->repos->create({
            # "org"  => "perlchina", ## the organization
            name => $reponame,
            description => ($self->{description} || ""),
            homepage => ($self->{homepage} || "" ),
            public => $self->{private} ? 0 : 1 ,
        });



( run in 0.354 second using v1.01-cache-2.11-cpan-05444aca049 )