This Lightweight Tool Flags Breaking Changes Before You Ship

by June 10th, 2025
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Release Impact Analyzer for Go projects — catch breaking API changes, docs updates & important file diffs — fast.
featured image - This Lightweight Tool Flags Breaking Changes Before You Ship
undefined HackerNoon profile picture
0-item

In modern Go projects, it's too easy for accidental API changes or subtle documentation edits to sneak through pull requests or release processes unnoticed.

relimpact is a lightweight CLI tool that helps you understand what really changed between two Git refs — with clean, structured, human-friendly reports.

Use it in CI pipelines, release PRs, or locally before tagging new versions.


✨ Features

  • 🔍 API Diff — Track breaking public API changes (structs, interfaces, functions, constants, variables).
  • 📝 Docs Diff — Section-aware Markdown diff to highlight meaningful content changes.
  • 🗂️ Other Files Diff — Group file changes by extension (.sh, .sql, .json, etc.) to surface migrations and auxiliary files.
  • 🚀 Designed for Release PR reviews — Quickly see the real impact of changes.
  • 🖋️ Markdown Reports — Ready to paste into GitHub Releases, Slack, or changelogs.
  • ⚙️ Works in GitHub Actions, GitLab CI, or locally — Integrates easily.
  • 🔒 No server required — Pure CLI tool.

🚀 Quickstart

Run on a GitHub PR:

relimpact --old=v1.0.0 --new=HEAD > release-impact.md

Example Output:

CHANGELOG

⚙️ GitHub Action Integration

name: Release Impact on PR

on:
  pull_request:
    branches: [ master ]
    types: [ opened, synchronize, reopened ]

jobs:
  release-impact:
    name: Generate Release Impact Report
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Determine previous tag
        id: prevtag
        run: |
          git fetch --tags
          TAG_LIST=$(git tag --sort=-version:refname)
          PREV_TAG=$(echo "$TAG_LIST" | head -n2 | tail -n1)
          echo "Previous tag: $PREV_TAG"
          # Fallback to first tag if no previous
          if [ -z "$PREV_TAG" ]; then
            PREV_TAG=$(echo "$TAG_LIST" | head -n1)
            echo "Fallback to first tag: $PREV_TAG"
          fi
          echo "prev_tag=$PREV_TAG" >> $GITHUB_OUTPUT

      - name: Determine new ref
        id: newref
        run: |
          if [ "${{ github.event_name }}" = "pull_request" ]; then
            echo "new_ref=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
          else
            echo "new_ref=HEAD" >> $GITHUB_OUTPUT
          fi

      - uses: hashmap-kz/relimpact-action@main
        with:
          old-ref: ${{ steps.prevtag.outputs.prev_tag }}
          new-ref: ${{ steps.newref.outputs.new_ref }}
          output: release-impact.md

      - name: Upload Release Impact Report
        uses: actions/upload-artifact@v4
        with:
          name: release-impact-${{ github.run_id }}-${{ github.run_attempt }}
          path: release-impact.md

📦 Installation

Homebrew

brew tap hashmap-kz/homebrew-tap
brew install relimpact

Manual Download

👉 Download latest release


🧠 How It Works

1️⃣ Go Source API Changes

  • Uses Go type system & AST parsing:
    • Detects breaking changes: method signatures, removed fields, new/removed types, etc.
    • Ignores formatting & comment noise.
    • Based on golang.org/x/tools/go/packages.

2️⃣ Markdown Docs Changes

  • Section-aware diff of .md files:
    • Headings added/removed.
    • Links and images changes.
    • Section word count diffs.
    • Based on goldmark parser.

3️⃣ Other Files Changes

  • Groups changes by file type:
    • .sql.sh.json.yaml.conf, etc.
    • Uses git diff --name-status.

Why Use It?

Most release PRs include:

✅ API changes
✅ Doc updates
✅ Migration scripts
✅ Other important config tweaks

But raw git diffis noisy and hard to review.
relimpact gives you a release-ready summary, focusing on what's important.


📜 License

MIT License. See LICENSE.


👉 Try it today: https://github.com/hashmap-kz/relimpact


If you found this useful, leave a ⭐ on GitHub — it helps others discover the project!

Happy releasing 🚀


Trending Topics

blockchaincryptocurrencyhackernoon-top-storyprogrammingsoftware-developmenttechnologystartuphackernoon-booksBitcoinbooks