-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Being able to trigger tests on mob start
#266
Comments
Love that idea. A simple command line hook would make a lot of sense. I support this.
If you have a hook, you can do anyting you like with that hook. This is not something mob would need to be modified for. Or did I miss something? But don't get me wrong - I like the idea you have. |
Good Idea. When you think about the wording, keep in mind that somebody else might want to do a mob next hook next. |
Right - with hooks one could do anything. Thanks for picking up the idea! |
@MrGung would you like to have a go at adding the |
Would be a great way to get into Go, for sure. Alas, it's hard to find the necessary time. I'll take the issue when I find time and it's still open! |
I've looked into it and started to implement Please assign me. Tests don't work on my machine, though - see issue #271. |
Hi, we would like to have a pre mob done hook. We would use to run the git pre_commit hook. |
Unfortunately we stopped doing mob-programming at my team. 😢 So I wouldn't be able to verify my changes in real life. The implementation I started can be found at my fork: https://github.com/MrGung/mob/tree/266-trigger-tests-on-mob-start I unassigned me. Sorry. |
I was just thinking a bit about this feature request. I think pre and post hooks are a good idea. But I think that would not be enough. I would like to configure these hooks for different project differently. But therefore I would need to specify the hooks in the project specific |
🤔 I understand the security concern with having a project specific .mob configuration. Otoh, it's cumbersome to have every user configure it, and then maintain all those configs. Then again, all the things that have been requested with regards to the hooks can be done outside of mob.sh, too. If we still wanted to do hooks in mob.sh, I think we need a way to have users approve changes to the projects .mob config The Idea is that when somebody changes the project config and adds a hook, you will be warned on your next mob command, and you can't do anything unless you approve those changes. Maybe with another command |
The Idea is good, but it would not work with the timestamp, because if you clone a repository the timestamp of the files is the timestamp when this file was create on your computer. This is a pitfall I experienced when I was implementing the open last modified file feature. But we could just use a hash of the config file or a hash of specific configuration like commands. But even then we should think about how we want to mark theses configuration files for different projects in the users config file. |
Another way would be a hash code |
As nobody asked for the hooks again, I think we should close that issue. What do you think @gregorriegler @simonharrer ? |
I think this gets complicated really quickly. first its just one command, then its a command per event, then its many commands per event, then its about handling interrupts, or some othee unforeseen complication. Maybe I am wrong, but I think the way to go here is to wrap mob.sh, and keep mob.sh simple. |
Maybe combine it with git hooks? |
I have continued with the implementation from @MrGung. Should I create a PR? |
yes @frulo , go ahead! |
I'd like to run (some) tests after successfull
mob start
, so that I can validate the current state of the code.To enter solution-land I'd suggest adding a hook in the vein of
MOB_NOTIFY_COMMAND
.To go further (another idea)
If that hook were present, I'd also use it to register the current source-project so that I could automatically call
mob next
upon closing the dialog I display withMOB_NOTIFY_COMMAND
. I wouldn't have to typemob next
after closing the dialog.The text was updated successfully, but these errors were encountered: