New Feature: Commit Webhook

Sounds like VIP developers really like webhooks 🙂

Based on a request on the original announcement for Deploy Webhook (Thanks Chris!), we added another one, this time for commits.

Now you can get pings via a simple webhook whenever a commit for your theme or plugin code is pushed to the subversion repo.

Same as before, you can specify your webhook endpoints in file called wpcom-meta.php in the root of your theme:

<?php
/**
 * Commit Webhook: http://example.com/path/to/endpoint.php
 */

Endpoints can be a comma-separated list of URLs.

Commit Webhook: http://example.com/path/to/endpoint.php,http://example.com/path/to/alternate.php 

Endpoints will receive something like the following as POST data:

array (
    'repo' => 'vip',
    'theme' => 'test-theme',
    'revision' => '1234',
    'committer' => 'batmoo',
)

Leave a comment here if you have any suggestions for improvements or other webhooks we could add. We’d also love to hear what you end up doing with these!

New Feature: Deploy Webhook

We’ve added webhook support for deploy notifications. Now you can get pings via a simple webhook whenever a deploy for your theme or plugin code is pushed live.

You can specify your webhook endpoints in file called wpcom-meta.php in the root of your theme:

<?php
/**
 * Deploy Webhook: http://example.com/path/to/endpoint.php
 */

The value of the endpoints in the “Deploy Webhook” line of the comment can be a comma-separated list of URLs.

Deploy Webhook: http://example.com/path/to/endpoint.php,http://example.com/path/to/alternate.php 

The endpoints should not involve redirects as those may not be followed during the notification process.

Endpoints will receive something like the following as POST data:

array (
    'repo' => 'vip',
    'theme' => 'test-theme',
    'previous_revision' => '1234',
    'deployed_revision' => '5678',
    'deployer' => 'batmoo',
    'revision_log' => 'r5678 Added new stuff that does things',
)

Thank you to the VIPs and partners who suggested this feature and helped us test things out. We’ve already seen or heard about implementations utilizing this like sending notifications to a group HipChat channel. We’d love to hear what you end up doing with this too; let us know!