Skip to content

The moment it happens

Post merged GitHub pull requests to Slack

Each merged pull request is posted to a Slack channel with title, author, lines changed and link.

Runs
The moment it happens
Apps
GitHub, Slack
AI
Not needed
Access
Pull requests: read (webhook); chat:write

Send this to your assistant

Create a ClickRuntime automation: when a pull request is merged in acme/app, post the title, author, who merged it, lines added and removed and the link to #shipped.

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

Teams like a channel where shipped work shows up, but GitHub's own Slack integration posts every comment, review and push unless you tune it carefully. Often what people actually want is one line per merged change.

This automation listens for closed pull requests and posts only the ones that were merged into the branches you choose. Each message has the title, the author, who merged it, the size of the change and the link.

Product managers use the channel to follow what went in, support teams use it to know when a fix is live, and engineering leads use it as a running log of the week.

What you get out of it

  • Merges only

    Pull requests closed without merging, review comments and pushes are not posted.

  • Size at a glance

    Lines added and removed show whether a merge was a one-line fix or a large change.

  • Branch filter

    Only merges into main, or the release branches you list, reach the channel.

  • Credit for the author

    The author and the person who merged are both named, which makes the channel useful for shout-outs.

  • Signed requests

    Each webhook is checked against your secret before anything is posted.

How it works

What happens, step by step

  1. GitHub sends a webhook to the automation when a pull request is closed.

  2. The automation keeps only pull requests that were merged, and ignores ones closed without merging.

  3. It builds a short message with title, author, who merged it, target branch, lines added and removed, and the link.

  4. The message is posted to the Slack channel you chose.

Before it runs live

  • Connect GitHub
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Post merged GitHub pull requests to Slackjust nowSucceeded
#shipped · SlackMerged into main: Add Parquet export (#812) by kchen · merged by vlee · +418 / -37 in 9 files https://github.com/acme/app/pull/812

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 Google Sheets
  • Combine it with other GitHub and Slack 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.
post_merged_github_pull_requests_to_slack.pyexample
from clickruntime import on_event, credentials, verify, notify

CHANNEL = "#shipped"
BRANCHES = {"main"}

@on_event
def handle(event):
    if not verify.github(event.body, event.header("X-Hub-Signature-256"), credentials.secret("GITHUB_WEBHOOK_SECRET")):
        return {"ignored": "bad signature"}
    body = event.json
    if event.header("X-GitHub-Event") != "pull_request" or body.get("action") != "closed":
        return {"ignored": True}
    pr = body["pull_request"]
    if not pr.get("merged") or pr["base"]["ref"] not in BRANCHES:
        return {"ignored": "not merged into a watched branch"}
    notify.slack(
        f"Merged into {pr['base']['ref']}: *{pr['title']}* (#{pr['number']})\n"
        f"by {pr['user']['login']} · merged by {pr['merged_by']['login']} · "
        f"+{pr['additions']} / -{pr['deletions']} in {pr['changed_files']} files\n{pr['html_url']}",
        channel=CHANNEL)
    return {"pr": pr["number"]}

FAQ

Common questions

Can I leave out bot pull requests like Dependabot?
Yes. Ask for authors ending in [bot] to be skipped, or posted to a quieter channel instead.
Does it work for several repositories?
Yes. Add the same webhook URL to each repository, or once at organisation level. The message includes the pull request link, so you can tell repositories apart.
Why only main?
Merges into feature branches are usually noise for a team channel. Add other branch names to BRANCHES, such as release branches, if you want them too.
What permissions does it need?
Pull requests: read (webhook); chat:write. 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 “Post merged GitHub pull requests to Slack” from your assistant

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