Lately, some users have been asking for a way to automate the synchronization between the POEditor localization platform and GitHub/Bitbucket repositories. Because we want to make them happy, we found a way to do this – webhooks. These “user-defined HTTP callbacks” can be used to trigger a certain sync in your repos. They can be called from anywhere, and can be maintained, modified and managed by any third-party users.
Preparing the webhook
To make use of a webhook, you first need to create a webhook URL. Find an example for GitHub here, and one for Bitbucket here.
After creating the webhook, you can add it to a GitHub or Bitbucket account so that events in the repos trigger terms (and translations) updates in a POEditor project.
Using webhooks with Bitbucket
To add a webhook to a Bitbucket account, just log on to it, go to Settings → Hooks, and select “POST” from the “Select a hook” dropdown menu. Then click on “Add hook” and introduce the webhook URL in the empty field. Whenever the repository changes, the webhook will be triggered to sync between the assigned language/project on POEditor and the file in the repo.
Using webhooks with Github
Adding a webhook to GitHub is also easy. Go to the account, click on Settings → Webhooks & Services → Add webhook, and add the webhook URL to the “Payload URL” field. Unlike in the case of Bitbucket webhooks, you can pick what kind of event(s) you want to trigger the webhook. It can be just the push event, individual events, or everything (any change in the repo).
So that’s that. The POEditor GitHub integration and Bitbucket integration are now faster than ever, because you have the choice to automatically send the updates in the repos to your localization projects managed on POEditor.
Update July 2015: It is now possible to use webhooks to export terms and translations from your POEditor localization project to your connected GitHub account. Please note that the export option can be triggered from anywhere, except GitHub.