tr Skip to content

Flag large pull requests for extra review

This workflow checks each GitHub pull request event for its line additions. Above 500, it requests reviewers and alerts Slack; otherwise it leaves a short thank-you comment on the PR.

GitHub Branch Slack

5 steps Setup ~8 min Used on 2.4k sites Developer & DevOps Free to import

The Flag large pull requests for extra review workflow on the FlowMattic canvas, with 5 steps across GitHub, Branch, Slack
The workflow as it appears in the builder after import. Each step opens for editing.

What this workflow does

Large pull requests are harder to review well. One reviewer skimming a thousand new lines can miss what matters, so many teams want a second pair of eyes on the big ones. This workflow sorts pull requests by size and gives the large ones extra attention.

The GitHub trigger is New / Updated Pull Request, so it runs when a PR is opened and again when it changes. A Branch then compares the PR's additions with 500. On the yes path, GitHub's Request Pull Request Reviewers action is called for that PR, and Slack gets a channel message with a link to the PR and its added line count. On the no path, GitHub posts a comment on the PR thanking the author for a small, focused change.

Because updates run it too, the same PR can pass through several times. A large PR may be announced in Slack after each push, and a small one may collect a fresh thank-you comment. The tips show how to limit runs to newly opened PRs.

Spotting oversized changes early

A team lead sees in Slack whenever a PR crosses 500 added lines and can ask the author to split it before review starts.

Extra reviewers on big features

Large feature branches get reviewers requested through GitHub, so they don't wait on a single person who happens to be busy.

Encouraging small pull requests

Contributors who send compact changes get a quick comment, a small nudge that keeps PRs easy to review.

How this workflow runs

What happens at each step once the workflow is on, and what you need before you import it.

  1. Step 1Trigger
    GitHub New / Updated Pull Request

    Fires when a pull request is opened or updated in the GitHub repository you connect. The PR's number, title, link, additions count and repository name are passed on.

  2. Step 2Logic
    Branch Branch

    Checks whether the PR's additions are greater than 500. Larger PRs take the yes path, and everything else, including exactly 500, takes the no path.

  3. Step 3Action
    GitHub Request Pull Request Reviewers

    Calls GitHub's Request Pull Request Reviewers for this PR using its repository and number. The template doesn't say who to request, so set the reviewers in this step and confirm them with a test run.

  4. Step 4Action
    Slack Send Channel Message

    Posts to the Slack channel you choose with a link to the large PR, its number and title, and how many lines it adds.

  5. Step 5Action
    GitHub Create Comment on Issue

    On the no path, adds a comment to the PR saying it is a small, focused change and a reviewer will look shortly. GitHub treats PR comments as issue comments, so the PR number works here.

What you need

  • FlowMatticCore
  • GitHub AccountAccount
  • Slack AccountAccount

After importing, map your own data. To keep the template universal, not every step is pre-filled. Open each step in the builder and connect your accounts and fields (channels, lists, sheets, recipients) before you switch the workflow on.

Make it yours

Changes worth making after you import it.

  • Add a Filter between the GitHub trigger and the Branch that continues only when the event's action is opened (check the field name in a test run). The Slack alert and the comment then happen once per PR, not after every push.
  • Change 500 in the Branch to suit your codebase. To catch PRs that mostly delete code as well, add a second condition on deletions.
  • If the thank-you comment feels like noise, delete the no-path step. Small PRs then pass through without any action.

Questions about this workflow

Does the workflow run again when a pull request gets new commits?

Yes. The GitHub trigger is New / Updated Pull Request, so updates start a new run. Without a Filter for newly opened PRs, Slack alerts and thank-you comments can repeat.

Who gets requested as a reviewer on large GitHub pull requests?

Whoever you set in the Request Pull Request Reviewers step. The template ships with only the repository and PR number filled, so add your reviewers before you switch it on.

What counts as a large PR?

More than 500 added lines, using the additions number GitHub reports for the PR. Deleted lines are not counted unless you change the Branch condition.

Does a small pull request also get the Slack alert?

No. The Slack step sits on the yes path, after the reviewer request. A PR with 500 or fewer added lines only gets the thank-you comment. Task History shows what each GitHub and Slack step returned on every run.

Import this workflow into your WordPress site

Download the JSON, import it from the Workflows screen and connect your accounts. Every run stays on your server, with no per-task fees.

30-day money-back guarantee Unlimited workflows and runs Self-hosted

Customers who run it every day

Rated 4.8 out of 5 by customers
Read more reviews

It's an exceptional product. Works great and extremely valuable. I saved thousands of dollard on Zapier, as Flowmattic makes me able to host the automation myself. And very deeply integrates with the products I need.

Tijn

Ease of use and terrific support from the founder. Tons of integrations and regular updates. The Flowmattic custom app is great especially if you want to integrate apps that aren't available yet inside Flowmattic.