Skip to content
Framework to allow scripting in Python of VSTS & TFS Service Hook Calls.
Branch: master
Clone or download
Latest commit 7c70cd3 Oct 30, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
ARMTemplate Added ARM template to provision site Dec 22, 2016
AzureDevOpsEventsProcessor.Dsl More naming chnages Oct 30, 2018
AzureDevOpsEventsProcessor.Tests More naming chnages Oct 30, 2018
Extension Changed the Q&A in marketplace to use github Oct 19, 2018
Sample.Dsl More naming chnages Oct 30, 2018
.gitignore Swapped to a model to merge the variables in the web.config Oct 29, 2018
AzureDevOpsEventsProcessor.sln Major rename to AzureDevOps Oct 30, 2018 Merge branch 'master' into tfsprocessorfixes Oct 30, 2018
Settings.StyleCop Initial commit after refactor from codeplex site Dec 21, 2016

Release Status - VSTSServiceHookDsl

This project replace the my original Codeplex Repo (now moved to GitHub as Codeplex is being depricated and is now read-only), which supported the older SOAP based alerts model. If you need to use this older SOAP model use this older project, but be warned it is not under active support.

Note that there are some breaking changes in the Python scripts between the old SOAP Alerts and this new Service Hooks, they are fairly minor, but you will need to edit any scripts you have for the old project.

Azure DevOps Services & Server Alerts DSL

Since it's inception Microsoft Team Foundation Server (TFS) provides a SOAP based alerting model where given a certain condition, such as a check-in, work item edit or build completion, an email can be sent to an interest party or a call made to a SOAP based web service. Using this SOAP model it is possible to provide any bespoke operations you wish that are triggered by a change on the TFS server.

Recent versions of Azure DevOps Service (TFS) and the hosted Azure DevOps Services (VSTS) also offer a REST Web Hook based alerts. This is now the preferred method for handling alerts.

This framework is designed to easie the development of a REST webhook services by providing helper methods for common processing steps and API operations such as calling back to the TFS server or accessing SMTP services.

The key feature of this project is that it provides a Python based DSL that allows the actual operation performed when the endpoint is called to be edited without the need to to rebuild and redeploy the bespoke service. Operations are defined by script such as show below

import sys
# Expect 2 args the event type and a value unique ID
LogInfoMessage( "The following arguments were passed" )
LogInfoMessage( sys.argv )
if sys.argv[0] == "build.complete" :
   LogInfoMessage ("A build event " + sys.argv[1])
   # a sample for using the DSL to create a work item is
   #fields = {"Title": "The Title","Effort": 2, "Description": "The desc of the bug"}
   #teamproject = "Scrum (TFVC)"
   #wi = CreateWorkItem(teamproject ,"bug",fields)
   #LogInfoMessage ("Work item '" + str( + "' has been created '" + str(wi.fields["System.Title"]) +"'")
elif sys.argv[0] == "git.push" : 
	print ("A JSON git.push event " + sys.argv[1])
elif sys.argv[0] == "tfvc.checkin" : 
	print ("A JSON tfvc.checkin event " + sys.argv[1])
	print ("Was not expecting to get here")
	print sys.argv

See the wiki for more details

You can’t perform that action at this time.