DEV Community

Olivier Buitelaar
Olivier Buitelaar

Posted on

Two More GitHub Actions: Stale Branch Cleaner + Changelog Generator

Shipped two more GitHub Actions today. Quick overview of both.

๐Ÿงน Stale Branch Cleaner

You know that repo with 47 branches, half of which were "temporary" six months ago? This fixes that.

name: Branch Cleanup
on:
  schedule:
    - cron: '0 9 * * 1'  # Every Monday
jobs:
  cleanup:
    runs-on: ubuntu-latest
    steps:
      - uses: ollieb89/stale-branch-cleaner@v1
        with:
          stale-days: '90'
          dry-run: 'true'
          create-issue: 'true'
Enter fullscreen mode Exit fullscreen mode

It scans all branches, finds ones with no commits in 90+ days, and creates a GitHub Issue with a report table. Set dry-run: false when you're ready to auto-delete.

Smart exclusions: main, master, develop, release/*, and hotfix/* are always protected.

โ†’ Source

๐Ÿ“ Changelog Generator

If you use conventional commits (feat:, fix:, docs:), this generates a grouped changelog automatically.

- uses: actions/checkout@v4
  with:
    fetch-depth: 0
- uses: ollieb89/changelog-generator@v1
Enter fullscreen mode Exit fullscreen mode

Output:

## Unreleased (2026-03-19)

### ๐Ÿš€ Features
- **auth:** add OAuth2 support (a1b2c3d)

### ๐Ÿ› Bug Fixes
- **api:** fix rate limit handling (i7j8k9l)

### โš ๏ธ Breaking Changes
- remove deprecated v1 endpoints (m0n1o2p)
Enter fullscreen mode Exit fullscreen mode

Breaking changes get their own section. Everything is emoji-categorized and commit-linked.

โ†’ Source

The Full Toolkit (6 Actions)

Action What It Does
workflow-guardian Lint workflows for security
test-results-reporter Aggregate test results
pr-size-labeler Label PRs by diff size
stale-branch-cleaner Clean up old branches
changelog-generator Auto-generate changelogs
Workflow Linter VS Code extension

All free, all MIT, all shipping today.

Top comments (0)