Documentation VIP Commit and Deploy Webhooks

Commit and Deploy Webhooks

As well as receiving e-mail notifications, you can set up repository-specific commit and deploy webhooks for your WordPress.com VIP code.

Set up

To tell WordPress.com which webhooks to ping, simply add a wpcom-meta.php to the root of your repo with something like this;


<?php
/**
 * Commit Webhook: https://incoming.my-webhook.com/commit
 * Deploy Webhook: https://incoming.my-webhook.com/deploy
 */

Committing that file is all you need to do to create the webhooks. If you have any difficulties, or need more information, don’t hesitate to open a ticket with us.

Note: Services, such as Slack, require data to be transformed into a standard format for their platform. So in this instance you would have to transform the data prior to passing it to Slack.

Commit Webhook

The commit webhook will provide the following data:

  • repo – The name of the repository.
  • theme – The name of the theme.
  • revision – The committed revision number.
  • committer – The WordPress.com username of the committer.

Deploy Webhook

The deploy webhook will provide the following data:

  • repo – The name of the repository.
  • theme – The name of the theme.
  • previous_revision – The previously deployed revision.
  • deployed_revision – The deployed revision number.
  • deployer – WordPress.com username of the person who deployed the revision.
  • revision_log – A log of commits between the previously deployed and newly deployed revisions.

Documentation is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.