Search code examples
gitgithubbuildbot

How can a buildbot track new branches on Github?


I've configured a buildbot (version 0.8.9) to track changes in all branches of a repository:

c['change_source'] = []
c['change_source'].append(GitPoller(
        "github.com:myaccount/myrepo",
        branches=True,
        pollinterval=300))

Works well except that it does not track the creation of new branches. But it tracks changes made after the branch creation. Example:

  • a new branch is created and pushed to Github
  • the buildbot does not track any changes
  • a modification is made in that branch and pushed to Github
  • the buildbot tracks that change and launch a build.

I'd like the buildbot to launch a build when a new branch is added in this repository.

Thank you.


Solution

  • I had the same issue and am glad to find someone with the same problem -- tells me it's probably not my setup.

    I dug into the issue a bit, and it turns out to be a bug in gitpoller.py. Fortunately, it's a relatively easy fix:

    https://github.com/kuna-systems/buildbot/commit/97bf812e053a3dc68eed7c1bb291d584d6177663

    After this modification, Buildbot immediately builds new pushed branches.

    I have also filed a bug report with the project:

    http://trac.buildbot.net/ticket/2841