ianmacl/pulltester — pull request #1 by elkuku (2011-11-04 20:36:21+00:00)
Title: Bugfix? Delete undeleted branches

You may have noticed, that the pull tester has gone a little crazy lately ;)

To prevent people getting discouraged, or even angry ( I already heard a `grrr` :( ), this should be fixed ASAP...

The problem, IMHO, *could* be that something happend before a created branch gets deleted (user interrupt ?). So the next attempt to `git checkout -b branchname` will fail and the following `git merge` will be applied to the staging branch, making it *dirty* for all subsequent tests.

I honestly don't know if that really makes sense, but it happened to me and the results look similar to those produced by fellow @joomla-jenkins lately ;)

To reproduce:

* While running the unit tests or the code sniffer for e.g. `pull 666`, press `Ctrl-C` and delete the db entry.
* On the next run, when executing `git checkout -b pull666`, a message like
`fatal: git checkout: branch pull666 already exists`
will appear and the branch remains on `staging`

Does that make sense ?

Next **bug**: On your current head I get a fatal error saying that the class JGithubRefs could not be found.. it seems to be missing in the repo..

Next **idea**: I believe that it would be helpfull to inform the "fellow contributors" about the details of the errors reported. It seems quite hard for a lot of people to setup phpUnit and the CodeSniffer...
So I am playing with some static GitHub pages to display the error details. Maybe a link to an (official) error detail page could be included in the pull request comment when reporting the errors.

It may look something like this: http://elkuku.github.com/pulltester/329.html
and even displays *funky* things: http://elkuku.github.com/pulltester/387.html
and an overview table: http://elkuku.github.com/pulltester/
The styles might need some improvements ;)

I wouldn't offer you the code for merging, as it contains a lot of *crap* and personal stuff, but you are hereby granted to copy & paste whatever you find usable from here:
https://github.com/elkuku/pulltester/blob/testing1/src/pulltester.php

Thats it for now :)

As always: Excellent work Ian. I really admire your innovative ideas