1
0
Fork 0
mirror of https://github.com/WordPress/wordpress.org.git synced 2026-03-03 09:16:09 +08:00
wordpress.org/svn.wordpress.org/bin/slack-commit-hook.php
2014-12-31 16:48:29 +00:00

20 lines
525 B
PHP

#!/usr/bin/env php
<?php
if ( $argc !== 4 ) {
echo "Usage: <trac> <repo> <rev>\n";
exit( 1 );
}
define( 'INC', dirname( __DIR__ ) . '/includes/slack-trac-hooks' );
require INC . '/commits.php';
require INC . '/trac.php';
require INC . '/config.php';
list( , $trac, $repo, $rev ) = $argv;
$slack_hook = 'https://hooks.slack.com/services/...';
$sender = new Dotorg\SlackTracHooks\Commits( $trac, $repo, $rev, $slack_hook );
// $sender->use_test_channel( true );
// $sender->set_svnlook_executable( ... );
$sender->run();