Skip to content

Commit

Permalink
Better logging of progress
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Mar 13, 2014
1 parent 2aa49ab commit 5ad9fd1
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions hooks/sob.php
Expand Up @@ -35,15 +35,11 @@
$commits = github_pull_commits($data['pull_request']['number']);

/* Process commits in the pull request to find one missing SOB */
$missing = array();
foreach($commits as $commit) {
if (strpos("\nSigned-Off-By:", $commit['commit']['message']) === false) {
github_comment_commit($repo_name, $commit['sha'], $message);
$missing[] = $commit['sha'];
echo 'Comment on ' . $commit['sha'] . ":\n";
echo $commit['commit']['message'];
echo "\n";
}
}

/* Report back that we've posted comment */
if (count($missing) > 0) {
die('Comment posted.');
}

0 comments on commit 5ad9fd1

Please sign in to comment.