In some of our git repos we use several config files that try to ensure a consistent dev env:
- scripts to ensure the sane state for using the repository (setup / check the runner workstation, install packages etc.)
- check configurations (test scripts, pre commit checks etc.)
Chenges to these files should be propagated quite soon from the
main to all development branches.
Additionally there are several other files, where changes should be propagated quite soon to all dev branches, like submodule updates etc.
In order to ensure this, we have a small script that is executed scheduled via cron, that checks all branches missing the integration of the latest changes to the list of important files and notifies the author/commiter of the last commit on these branches by mail.
Another cause for problems are sometimes branches that have diverged to far from main.
Merging these branches to main is often quite difficult. Sometimes even switcheing to these old branches is not possible
error: The following untracked working tree files would be overwritten by checkou, ...).
So the script can monitor the branches using different thresholds, for example a configuration like:
- days: 20
- days: 14
will notify the user if his branch is missing at least 20 commits and 20 days diverged or at least 40 commits and 14 days etc.
The script is configured and deployed via ansible ...