Search code examples
azure-devopspull-requesttfs-workitem

Automatically Create a Work Item on new Pull Request


We would like to have task created when on new Pull Request .

What I would like to do is:

  1. Find User Story Pull Request Review in Current Sprint
  2. If not exist, create it.
  3. Create Task Review Pull Request X under previous story.

That feature doesn't seem to exists in Azure DevOps. Even simply creating a task on new pull request...

The Only way I can think of is through a Service Hook with a custom Web hook.

Can you guide me through this?


Edit We are currently reviewing a solution using Zapier but we cannot perform exactly what is described above, and it's a paid subscription


Solution

  • I use custom app and run it through the task scheduler. Rest Api methods:

    1. View active pull requests. In my case, I use a service comment (like "Review task is created") in pull request. If I did not find it, I`ll create a task, link it to PR and add the service comment.
    2. Create task and link it to pull request.

    Here is the sample project: Create and View Pull Requests