Reputation: 17
My team leader wants to get notified whenever changes are made to a specific Project.
Is there a possibility within Git to supervise specific Folders or Files and get notifications if the code changes?
Upvotes: 0
Views: 101
Reputation: 497
If you are just looking for an FYI, you can configure a build job with continuous integration enabled and the 'Path Filters' set to the folders or files you want to supervise. This build definition could be empty as you are not actually trying to build, but rather kick off a notification workflow.
This would create a build each time a file or folder changes that is in the path filter. You then have to decide how you would like to be notified. Here you have a couple options, but 2 fairly easy ones would be as follow:
Note: if you want to prevent changes to these areas, then you should use branch policies suggested by Daniel Mann.
Note 2: Depending on the volume, if there are tons of changes to these paths, you may overwhelm your build server or consume all your build minutes quickly.
Upvotes: 1
Reputation: 59035
You can configure branch policies for your repository to require a code review; this will trigger a notification.
The branch policy can be limited require review only for certain files or folders.
Upvotes: 1