GGMU1878
GGMU1878

Reputation: 17

Supervise Project changes within Git

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

Answers (2)

DenverDev
DenverDev

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.

enter image description here

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:

  1. Use a Send Email task from the VSTS Marketplace, there are a number of options depending on your needs. VSTS Marketplace Email Tasks
  2. Configure a new 'Notification Subscription' under Settings -> Notifications and set this up to send an email to whomever is doing the monitoring any time a build completes for that definition.

New VSTS Notification Subscription

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

Daniel Mann
Daniel Mann

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

Related Questions