Skip to content

The moment it happens

Get a message when a pull request opens

Reviewers see each new pull request with its title, author and link as soon as it's created.

Runs
The moment it happens
Apps
Azure DevOps
AI
Not needed
Access
Code Read (service hook set up in project settings)

Send this to your assistant

Create a ClickRuntime automation: whenever a pull request is created in our Azure DevOps repo web-app, post the title, author and link to #code-review in Slack.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

On a team of eight developers, a pull request that nobody notices is a pull request that waits. The author opens it in Azure Repos at 10 am, assumes someone will pick it up, and goes back to coding. Reviewers are busy in their own work, email notifications from Azure DevOps are filtered or ignored, and by the next afternoon the PR is stale, conflicts with main, and the author has already started the next feature on top of unreviewed code.

When a pull request is created in your repository, an Azure DevOps service hook sends the event to ClickRuntime. ClickRuntime picks out the title, the author and the link and posts them to Slack, so the whole team sees the new PR right when it is opened and a reviewer can claim it.

Teams that want shorter review times without introducing a formal on-call reviewer rota will find it useful.

What you get out of it

  • Reviews start within the hour

    A visible message in the team channel prompts someone to say they will take it. Waiting a full day for a first comment becomes the exception instead of the normal pace.

  • Authors keep their momentum

    A developer whose PR is picked up quickly does not have to context-switch back to old work days later. Feedback arrives while the change is still fresh in mind, so fixes are faster and more accurate.

  • Merge conflicts stay small

    The longer a PR waits, the more main moves underneath it. Fast reviews mean branches are merged before they diverge, which spares everyone a tedious rebase. Developers avoid the tedious rebase that follows a long wait.

  • Review load is spread more evenly

    When every PR appears in a shared channel, different people pick them up. Without it, the same one or two senior developers tend to get asked, and they become bottlenecks.

  • Cross-team changes are noticed

    A PR touching a shared library might need eyes from another team. Because the title and author are visible to everyone in the channel, relevant people can step in before merging.

How it works

What happens, step by step

  1. Each time a pull request is created in Azure DevOps, Azure DevOps tells ClickRuntime straight away.

  2. It picks out the repository, title and author.

  3. A message goes to #code-review with those details and a link to the pull request.

Before it runs live

  • Connect Azure DevOps
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Get a message when a pull request opensjust nowSucceeded
Slack · #code-reviewNew PR in web-app: *Add Northwind SSO login* by Taylor https://dev.azure.com/acme/Phoenix/_git/web-app/pullrequest/412

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Azure DevOps steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
new_pull_request_alert.pyexample
from clickruntime import on_event, notify

REPO = "web-app"

@on_event
def handle(event):
    body = event.json or {}
    if body.get("eventType") != "git.pullrequest.created":
        return {"skipped": body.get("eventType")}
    pr = body["resource"]
    if pr["repository"]["name"] != REPO:
        return {"skipped": pr["repository"]["name"]}
    link = f"{pr['repository']['webUrl']}/pullrequest/{pr['pullRequestId']}"
    notify.slack(f"New PR in {REPO}: *{pr['title']}* by {pr['createdBy']['displayName']}\n{link}",
                 channel="#code-review")
    return {"pr": pr["pullRequestId"]}

FAQ

Common questions

Does it post draft pull requests?
Azure DevOps sends the same created event for drafts, and the payload includes an isDraft flag. ClickRuntime can skip drafts so the channel only sees PRs that are ready for review, and post again when a draft is published, if you want that.
Can I send alerts for only some repositories?
Yes. When you create the service hook you can pick a single repository and optionally a target branch such as main. Teams with several repositories often create one hook per repo and send each to a different channel.
Is the description included in the message?
The title, author and link are standard. The description can be added, though long ones clutter the channel, so many teams include just the first few lines. Your AI assistant can set the length when you ask for it.
What permissions does it need?
Code Read (service hook set up in project settings). Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Get a message when a pull request opens” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.