From Commit to Inbox: Automating Change Summaries with Azure AI

Introduction

In our small development team, we usually merge code without formal pull requests. Instead, changes are committed directly by the developer responsible for the project, and while I don’t need to approve every change in my role as the senior developer, I still need to stay aware of what’s being merged. 

Manually reviewing each commit was becoming too time-consuming, so I built an automated process using Power Automate, Azure DevOps, and Azure AI.
Now, whenever a commit is made, it triggers a workflow that summarizes the changes and sends me an email.
This simple system keeps me informed without slowing down the team’s work.

Although I kept the automation straightforward, it could easily be extended further.
For example, it could be improved to allow me to reply directly to the committer from the email or even display file changes in detail using a text comparison feature in Outlook.
We didn’t need that level of detail, but it’s a good option if deeper insights are ever required.


References

Journey

We get started with the Azure DevOps trigger "When a code is pushed".
Here we specify the organization name, project name and repository name.
We can also specify a specific branch if we want to limit our tracking to simply that branch otherwise it tracks all the available branches to the User.


Then we have a foreach loop that iterates over the "Ref Updates" object array.
It contains a list of all the changes but not the exact details.
This action pops up automatically as well when we configure the next action.


Then we set up a "Azure DevOps REST API request to invoke" action.
This has connection capabilities to Azure DevOps directly so it is better to use over a simple REST API action.
We specify the relative URL as 
{Repository Name}/_apis/git/repositories/{Repository ID}/commits/{Commit ID}/changes?api-version=6.0
The Commit ID shows up as newObjectId in the "When code is pushed" trigger.


Then we pass the output of this action to a "Create Text with GPT using a prompt" action under the AI Builder group.
I've passed the prompt as below but it took several trials and errors to get exactly what I wanted.


The last action is a simple "Send an email" one where I've kept myself as a recepient and I've added a subject and a body.


Now to put it all together and run it -


And here is the final output -


When the hyperlinks are clicked they take me straight to azure while pointing to the file which is referred.
For instance, if I click on the Events Codeunit -


Conclusion

Summarizing commit changes is just one way automation can make life easier.
This same idea can be applied to other tasks, like summarizing meeting notes, project updates, or customer feedback.
With a bit of creativity, we can use tools like this to cut down on repetitive work and free up time to focus on learning new skills or tackling more challenging projects.
By finding smart ways to streamline our workflows, we can work more efficiently and open up more time for growth and development.

Comments