Skip to content

Commit

Permalink
Moar cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
holdenk committed Dec 17, 2012
1 parent 2f0c910 commit ad2a341
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 6 additions & 2 deletions fix_pandas.pl
Expand Up @@ -33,6 +33,9 @@
my $ua = new LWP::UserAgent; my $ua = new LWP::UserAgent;
print "Hello!\n"; print "Hello!\n";
print "Connecting to github!\n"; print "Connecting to github!\n";
my $u = Pithub::Users->new( token => $token );
my $result = $u->get;
print Dumper($result);
print "Reading input\n"; print "Reading input\n";
while (my $l = <>) { while (my $l = <>) {
if ($l =~ /github\.com\/(.*?)\s*$/) { if ($l =~ /github\.com\/(.*?)\s*$/) {
Expand Down Expand Up @@ -78,7 +81,7 @@ sub handle_url {
print "using master branch: $master_branch\n"; print "using master branch: $master_branch\n";
if (!$clone_url) { if (!$clone_url) {
print "Error, no clone url\n"; print "Error, no clone url\n";
print Dump($result); print Dumper($result);
next; next;
} }
#Oh hey lets merge the latest business to eh (just in case we have an old fork) #Oh hey lets merge the latest business to eh (just in case we have an old fork)
Expand All @@ -95,14 +98,15 @@ sub handle_url {
#Now we iterate through each of the processors so the git commit messages are grouped logically #Now we iterate through each of the processors so the git commit messages are grouped logically
print "handling the files\n"; print "handling the files\n";
my @changes = handle_files(@all_files); my @changes = handle_files(@all_files);
`cd foo && cd * && git push`;
#Did we change anything? #Did we change anything?
if ($#changes > 0) { if ($#changes > 0) {
#Yes! #Yes!
my $pull_msg = generate_pull_msg(@changes); my $pull_msg = generate_pull_msg(@changes);
my $twitter_msg = generate_twitter_msg(@changes); my $twitter_msg = generate_twitter_msg(@changes);
#Make pull #Make pull
my $pu = Pithub::PullRequests->new(user => $user ,token => $token); my $pu = Pithub::PullRequests->new(user => $user ,token => $token);
my $result = $pu->create(user => $user, my $result = $pu->create(user => $ruser,
repo => $repo, repo => $repo,
data => { data => {
title => "Pull request to a fix things", title => "Pull request to a fix things",
Expand Down
3 changes: 1 addition & 2 deletions targets.pl
Expand Up @@ -13,8 +13,6 @@
my $user = $settings->{"bing.user"}; my $user = $settings->{"bing.user"};
my $appid = $settings->{"bing.appid"}; my $appid = $settings->{"bing.appid"};


print "using token:$token user:$user appid:$appid\n";

my $inc = 10; my $inc = 10;
my $offset = 0; my $offset = 0;
my $max = 100; my $max = 100;
Expand All @@ -24,6 +22,7 @@
"readme.pod site:raw.github.com", "readme.pod site:raw.github.com",
"hmac php site:raw.github.com"); "hmac php site:raw.github.com");
foreach my $query (@queries) { foreach my $query (@queries) {

while ($offset < $max) { while ($offset < $max) {
my $search = Bing::Search->new(); my $search = Bing::Search->new();
$search->AppId($appid); $search->AppId($appid);
Expand Down

0 comments on commit ad2a341

Please sign in to comment.