Skip to content

feat: pre-filter internal PRs to reduce AI token usage - #14

Merged
berat merged 3 commits into
mainfrom
develop
Jun 23, 2026
Merged

berat merged 3 commits into
mainfrom
develop

Conversation

@berat

@berat berat commented Jun 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • PRs matching conventional commit prefixes (chore, ci, build, refactor, test, style, perf), bump patterns, dependabot/renovate, or internal labels are classified as internal without an AI call
  • Cost estimate (--dry-run, --show-cost) now reflects only PRs actually sent to AI - pre-filtered ones are excluded from the calculation
  • Generate output shows pre-filtered count: "Analyzed — 4 user-facing, 2 hidden, 5 pre-filtered"

AI cost impact: In a typical repo, 30-40% of merged PRs are dependency bumps, CI fixes, or refactors. This change skips the AI call for all of them - estimated token savings of ~30-40% per generate run.

Test plan

  • Run releasehub generate on a repo with dependabot PRs and confirm they appear as internal without AI call
  • Run releasehub generate --dry-run and confirm cost estimate excludes pre-filtered PRs
  • Run test suite: nvm use 18 && npm test --workspace=packages/cli

PRs matching conventional commit prefixes (chore/ci/build/refactor/test),
bump patterns, dependabot/renovate, or internal labels are classified as
internal without an AI call. Cost estimate also accounts for pre-filtered
PRs so the shown estimate reflects actual AI usage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@berat berat self-assigned this Jun 23, 2026
berat and others added 2 commits June 24, 2026 02:35
@berat
berat merged commit aa0a988 into main Jun 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant