New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitPoller: Allow polling all branches, or a filtered subset of branches. #579
Conversation
The make the ``branches`` argument accept either ``True`` to poll all branches, or a callable to filter the remote branches.
Actually, further consideration, particularly of http://trac.buildbot.net/ticket/2374, suggests that the poller probably doesn't do the right thing, for anything other than branches. (And perhaps not even for topic branches?) That makes me leery of the callable support, since every time we call a specified user function, we have wanted to change the behaviour at some point down the line. |
* a list of the branches to fetch. | ||
* ``True`` indicating that all branches should be fetched | ||
* a callable which takes a single argument. | ||
It should take a remote refspec (such as ``'refs/heads/master'``, and return a boolean indicating whether that branch should be fetched. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also explain the defaults.
What's the status here? I'd really like to see this fixed in Buildbot. Thanks |
+1 I would love to see this |
Thanks for the pings. This needs some docs and to not accept a callable argument. One nice in-between option is to use a method for filtering refspecs, and describe that method as something that can be overridden in a subclass. That makes things a little easier to upgrade in the future, and also makes it clear that things are being customized, not just configured. Either of you folks (@theY4Kman or @krf) can pull this branch into your own repo, hack away, and submit a new pull req. |
I'd still love to see this happen, but the branch has been bitrotted - @tomprince, do you want to rebase and merge? |
@djmitche I just rebased @tomprince 's version of @Jc2k 's branch: jhol/buildbot@3c5eeef I to would be very interested in seeing this patch enter the mainline. It now passes all tests, and applies cleanly, but I didn't use it for real yet. I should be able to do that tomorrow. |
The make the
branches
argument accept eitherTrue
to poll all branches,or a callable to filter the remote branches.
Supersedes #490.