Open otherguy opened 8 years ago
@darkwinternight: What would be the use case to check only for modified files? Please also note that once a file is added to git it stays in the history.
My specific use case would be database migration scripts. My coworkers sometimes ahem edit old database migration scripts which then don't get run on production deployments, breaking a site.
People should be able to add files but not modify or delete them. All my database migration scripts have a specific filename pattern and I can write a regex for that.
Thanks for providing some inside into the use case. Shouldn't be too complicated to implement. I will try to look into it in the next days.
BTW: Which version do you currently use?
What about moving a file? Should this be possible?
Bamboo 5.10.1.1 File Hooks Plugin 2.2.0
Well at least in my case, once a file has been pushed, it should never be touched. Deletion, modification and moving of the file shouldn't be possible (if I need to rollback a database migration, the migration script needs to exist).
From a UX perspective of your plugin, it would be nice to have checkboxes next to the regex field (adding, modifying, deleting, ...) that would restrict the match to the type of action that is being performed on the file.
I.e.:
foo.bar
readme.*
database/migrations/*.php
Reject commits with a matching file name ONLY if said file is being modified, i.e. not if the file is being created.