Skip to content

Commit

Permalink
fix the GitHub hooks URL and give manual instructions for the Enchant…
Browse files Browse the repository at this point in the history
… issue
  • Loading branch information
zmughal committed Aug 30, 2015
1 parent 9c4cecf commit 120c963
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions tool/enchant
Expand Up @@ -36,6 +36,7 @@ sub main {

$self->create_repo();
$self->add_hooks();
$self->manual_issue();
}

sub request {
Expand Down Expand Up @@ -105,10 +106,8 @@ sub check_required {

sub add_hook {
my ($self, $data) = @_;
$self->request(
'POST',
"https://api.github.com/repos/@{[ $self->github_org ]}/@{[ $self->github_user ]}/hooks",
$data);
my $url = "https://api.github.com/repos/@{[ $self->github_org ]}/@{[ $self->github_repo ]}/hooks";
$self->request( 'POST', $url, $data );
}

sub add_hooks {
Expand Down Expand Up @@ -140,4 +139,14 @@ sub add_hooks {
});
}

sub manual_issue {
my ($self) = @_;
print "Please create an issue titled 'Enchant' with the following contents\n\n" . <<ISSUE . "\n";
- [ ] Travis-CI <https://travis-ci.org/@{[ $self->github_org ]}/@{[ $self->github_repo ]}> (https://travis-ci.org/profile/@{[ $self->github_org ]})
- [ ] Appveyor CI (https://ci.appveyor.com/)
- [ ] Coveralls <https://coveralls.io/r/@{[ $self->github_org ]}/@{[ $self->github_repo ]}> (https://coveralls.io/repos/new?name=@{[ $self->github_org ]})
- [ ] IRC notifications (handled by devops `enchant` script)
ISSUE
}

main;

0 comments on commit 120c963

Please sign in to comment.