beefore
beefore copied to clipboard
Add the ability to run checks locally
Beefore currently has some implicit assumptions that it's running on a PR that is active, and on GitHub. While this is an important use case, it's also important that we can run against a local git checkout.
@freakboy3742 had you given any thoughts on how you wanted this to work?
I can see that being able to pip install, call with some arguments is possibly the most sensible way but having never done anything like that might be a bit of a stretch for me right away. Was thinking a short step of building it in to be run from a pulled version of the repo and then looking at packaging for pypi?
The issue isn't with invocation - that already works. If you pip install beefore
, you can run beefore
to start the beefore executable. However, it fails because of the command line arguments that are required.
Those command line arguments request Github-specific details (username, pull request ID, etc), which make sense when you're checking a PR, but don't for local execution. We need to be able to run checks against the "diff against master" for a development branch, rather than using the Github API.
My initial thought is that running beefore in "CI-mode" (which is what is currently implemented) should be turned on with a flag (e.g., beefore --ci -u username ...
); "naked" invocation would be "check the current branch against master"; but there would also be ways to invoke locally in the case where master
isn't the comparison branch, or master
is the branch you're working on.
Ahh I should have checked to see if it was packaged already.
I will have a look, and see if I can put something together and put it out for discussion