Repository Callbacks

Often, a team may find that they need to know when a new commit has been made to a repository. Perhaps they have installed a continuous integration or automated build server or perhaps they want to automate deployment upon commit to a stable branch of the repository.

The Wrong Way

One way to the know whether or not a commit has happened is to simply query the repository at some regular interval. However, this is an inefficient approach as it requires an expensive calls to the server, even when no new commits exist. Additionally, it can mean that there can be a lag of many minutes before your automated solution (build process or deployment script) can take action.

The Right Way

Repository Callbacks offer an elegant and efficient solution for notification of commits to a repository. For each commit to this repository, Unfuddle will perform an HTTP post against the provided Callback URL on your servers. This prevents the need for pinging repositories for their latest revision at regular intervals.

The data that is posted to your Callback URL is an Unfuddle Changeset object. For example:

<?xml version="1.0" encoding="UTF-8"?>
<changeset>
  <author-id type="integer"> </author-id>
  <created-at type="datetime"> </created-at>
  <id type="integer"> </id>
  <message> </message>
  <repository-id type="integer"> </repository-id>
  <revision> </revision>
</changeset>

Please note that the repository callback URL may contain HTTP basic authentication credentials. For exampe: "http[s]://user:password@example.com/callback/path"