KBLY
KBLY

Reputation: 34

How to get pull requests programmatically from TFS/Azure DevOps?

I want to make a C# application which notifies the user, when a new pull request comes in. Therefore I need a way to check for pull requests (in an interval). I looked at the TFS Api documentations, but couldn't find what I was looking for. Can somebody tell me if this project is actually doable and could direct me into the right direction?

Upvotes: 0

Views: 732

Answers (1)

Markus
Markus

Reputation: 22456

Instead of creating an application that periodically checks for pull requests, you can subscribe to a service hook that handles the "Pull request created" events. You can register predefined apps that are notified or create one of you own that provides a web hook and reacts to the event with custom code.

This way, you get a push notification instead of pulling over and over again.

See this link for an overview, this link for implementing a custom WebHook.

Upvotes: 1

Related Questions