Git Product home page Git Product logo

Comments (7)

christiangalsterer avatar christiangalsterer commented on September 23, 2024

@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.

from stash-filehooks-plugin.

otherguy avatar otherguy commented on September 23, 2024

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.

from stash-filehooks-plugin.

christiangalsterer avatar christiangalsterer commented on September 23, 2024

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.

from stash-filehooks-plugin.

christiangalsterer avatar christiangalsterer commented on September 23, 2024

BTW: Which version do you currently use?

from stash-filehooks-plugin.

christiangalsterer avatar christiangalsterer commented on September 23, 2024

What about moving a file? Should this be possible?

from stash-filehooks-plugin.

otherguy avatar otherguy commented on September 23, 2024

Bamboo 5.10.1.1
File Hooks Plugin 2.2.0

from stash-filehooks-plugin.

otherguy avatar otherguy commented on September 23, 2024

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.:

  • you cannot add files matching foo.bar
  • you cannot delete files matching readme.*
  • you cannot delete, modify or move files matching database/migrations/*.php

from stash-filehooks-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.