Playbook

Get alerted when a PR is submitted on GitHub

Be the first to know when changes are pushed to your repo.

Start for free

Teams:

Developer Relations

Sources:

GitHub logoGitHubSlack logoSlack

Overview

Pull requests are a sign of a healthy GitHub repo. It’s an even better sign when your community contributes those PRs.

GitHub PRs from your developer community aren’t just about adding features or fixing bugs—they signal that your DevRel program is paying off. It’s one thing to invite users to contribute to your open-source software; it’s another for them to take you up on it.

To encourage and reinforce this behavior, it’s helpful to know it’s happening immediately, follow up, and lend a helping hand with haste.

This playbook will show you how to tag meaningful source-specific activity (like when a PR is submitted on GitHub). Even better, we’ll also walk through how to notify your team members on Slack when a PR is submitted.

What you’ll need

Common Room: this is what we’ll use to ingest activity from GitHub (Sign-up for free to follow along).
GitHub: Admin access or approval from your repository admin.
Slack: Permission to add applications to your community or company Slack instance.

Step 1: Pull GitHub data into Common Room

Our first step is to connect your repo to Common Room so we can pull in activity and create filters for our alerts. To do that, head to the Settings menu in Common Room and select Connect GitHub.

Connect GitHub to Common Room
Connect GitHub to Common Room

After clicking to connect, you’ll be asked to authenticate your GitHub identity and select any repos where admin approval is granted.

Authenticate GitHub account and select relevant repos
Note: Connecting to GitHub requires approval from one of your org admins. If you are not an org admin and proceed through the integration setup, GitHub will email your org admins requesting their approval. Common Room will begin importing activity from your repo once an admin approves the request.

And once authenticated is verified, you’ll see activity data from GitHub in your Common Room instance after a few minutes.


Step 2: Filter activity from GitHub

With your GitHub repos connected, we can head to the 💬 Activity pane in Common Room to get a sense of volume, activity type, etc.

Because Common Room is a single platform for operationalizing activity across many digital channels, many “rooms” (what we call a customer instance) have multiple sources connected.

For our Uncommon community, we have more than 186k activities tracked! That’s way too many for this use case, so we’ll want to add filters to extract developer signals from the noise on channels like LinkedIn or Twitter.

Activity overview
Activity overview

From this view, we can click on + Add filter and select Source activity type from the menu. This will allow us to pinpoint GitHub pull requests.

With the source filter selected, we can hover over GitHub and check the button for Pull requests submitted. This brings our activity down to a couple thousand. Better, but still too much volume for our use case.

Filter by GitHub source activity type
Filter by GitHub source activity type

To filter further, we can click on the calendar icon on the right side of the activity panel and choose Last 7 days. This narrows our results to a couple dozen pull requests from the last seven days. Much more manageable.

Add time constraints to activity filters
Add time constraints to activity filters

Now, let's create an alert to send real-time notifications to Slack.


Step 3: Automate team alerts

Head over to the team alerts menu on the left nav and click the + Create team alert.

Team alerts overview
Create alerts for your team

This will take us to the alert workflow, where we can set up a trigger from an event (PR submitted, in this case), a filter to narrow alerts if needed, and an action to send the alert to a destination.

Workflow for team alerts
Send team alerts from a Common Room source to your alerting destination

First, we’ll select a trigger to initiate our alert. We’ll select Community Wide from the trigger dropdown and select 💬 New activity as our event.

Trigger on new activity
Trigger a team alert from member activity

We’re then taken to a filter step. And from here, we can select Activity filters and add the same criteria we used above: source activity type = GitHub and activity = pull requests submitted.

Filter team alerts by activity
Filter alerts by activity on GitHub

We also don’t want alerts when our own team members submit pull requests, so we’ll add an additional member filter to exclude our team.

Add member filters to alerts
Add filters to your alerts to exclude members
Note: If we wanted to refine our team alerts, we could add additional filters here for firmographics (e.g., company size > 10 or industry excludes health care).

And for our final step in our team alert workflow, we’ll select to send alerts to Slack and choose the channel we want alerts to go to.

Send alerts to Slack destination
Send PR notifications to a Slack channel

When you click "Create alert," you’ll see a confirmation modal to send a test message. We want to test what this looks like, so we’ll send it.

Send a test message to Slack
Send a test alert message to Slack

Everything looks good and our channel was updated, so we’ll click "Create and turn on." And with that, our alert is live!


Wrapping up

With this playbook, we isolated meaningful activity from GitHub and alerted our team to take action. However, this is just scratching the surface of what’s possible by combining activity tracking, filters, tagging, and automated workflows in Common Room.

You could continue down this path and run the same play for GitHub issues, comments, and more. And that’s just for the GitHub source. The same process can easily be applied to other sources, such as LinkedIn, Stack Overflow, Twitter, and any of our dozens of integrations.

rocket ship blasting off

Try Common Room for free

Start for free

Wanna learn more? Book a demo