watson-ruby icon indicating copy to clipboard operation
watson-ruby copied to clipboard

This is pretty messy, maybe clean it up later [lib/watson/github.rb]

Open nhmood opened this issue 11 years ago • 0 comments

filename : lib/watson/github.rb line # : 158 tag : review md5 : 5999817394727cd3abdcb9a61058d776

        # [review] - This is pretty messy, maybe clean it up later  
        # Check response to validate repo access
        if _resp.code == "404"
            print "\n"
            Printer.print_status "x", RED
            print BOLD + "Unable to access /#{ _owner }/#{ _repo } with given credentials\n" + RESET
            print "      Check that credentials are correct and repository exists under user\n"
            print "      Status: #{ _resp.code } - #{ _resp.message }\n\n"
            return false
            else
            # If it is anything but a 404, I THINK it means we have access...
            # Will assume that until proven otherwise
            print "\n"
            Printer.print_status "o", GREEN
            print BOLD + "Repo successfully accessed\n\n" + RESET
        end

nhmood avatar Nov 21 '13 16:11 nhmood