Skip to content

Commit

Permalink
use .netrc for enchantment auth
Browse files Browse the repository at this point in the history
  • Loading branch information
zmughal committed Jun 12, 2015
1 parent bfd20da commit d3bb54b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tool/enchant
Expand Up @@ -3,15 +3,16 @@
REPO="$1"

# curl -u $GITHUB_USER:$GITHUB_PASSWD
IRC_HOOK_URL=`curl -H "Accept: application/json" https://api.github.com/repos/PDLPorters/"$REPO"/hooks | perl -E '
# use -n for .netrc to set password on api.github.com domain
IRC_HOOK_URL=`curl -n -H "Accept: application/json" https://api.github.com/repos/PDLPorters/"$REPO"/hooks | perl -E '
use JSON::MaybeXS;
use Modern::Perl;
my $d = join "", <>;
my $j = decode_json($d);
my $irc = ( grep { $_->{name} eq "irc" } @$j)[0];
say $irc->{url};
'`
curl -H "Accept: application/json" -X PATCH $IRC_HOOK_URL -d '
curl -n -H "Accept: application/json" -X PATCH $IRC_HOOK_URL -d '
{
"events": [
"push",
Expand Down

0 comments on commit d3bb54b

Please sign in to comment.