drewdeponte / git-ps-rs

Official git-ps Rust implementation - the future of git-ps
https://git-ps.sh
MIT License
82 stars 8 forks source link

Allow hooks to be triggered after "gps pull" #186

Open chillbrodev opened 1 year ago

chillbrodev commented 1 year ago

Sometimes certain hooks should be triggered after a gps pull. Looking for the ability to add one or more hooks to trigger after gps pull is ran.

The idea is I have some setup scripts that are part of our lifecycle and should/need to be ran after each pull. Sometimes other devs miss these or only run them partially. So this could enforce our lifecycle.

These hooks should be able to be configured on/off as well as part of gps's repo or local settings.

ctsstc commented 1 year ago

This would be great for: builds, migrations, and dependencies.

A nice-to-have would be to have a list of all files changed since the last pull, this way the script could check for certain files or types of files to be changed to conditionally run code -- like running a migration when migration files come in, npm install when package-lock.json changes, or freezed files in dart repos.

drewdeponte commented 1 year ago

It might also be that there needs to be a lifecycle hook for something else other than just pull because some of these things you are talking about you really want to do anytime the state of your stack changes.

Maybe the hook should really do some more general hook around stack changed.