Skip to content

feat(githooks): implement pr-size calculation and split-pr skill - #23617

Open
kalverra wants to merge 1 commit into
DX-5066/1-ui-stylingfrom
DX-5066/2-prsize-core
Open

feat(githooks): implement pr-size calculation and split-pr skill#23617
kalverra wants to merge 1 commit into
DX-5066/1-ui-stylingfrom
DX-5066/2-prsize-core

Conversation

@kalverra

@kalverra kalverra commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Intent

Provide the core engine for analyzing Git diff sizes, identifying oversized branches before pushing, and guiding developers on breaking large PRs into reviewable stacked layers.

image

I used this PR as a dogfood example for the skill!

Changes

  • Add internal/prsize package: Calculates effective line diffs (additions/deletions) between HEAD and the default trunk branch using multiple configurable strategies (defaulting to per-file-max).
  • Ignore lockfiles and generated files: Excludes machine-generated files and lockfiles (go.sum, yarn.lock, etc.) so diff counts reflect human-authored logic.
  • Add split-pr skill: Standardizes the stacked PR workflow using isolated Git worktrees (.worktrees/) to prevent index lock contention and IDE workspace thrashing.
  • Add benchmark and comprehensive unit test suite: Covers git parsing, ignore heuristics, size thresholds, and edge cases (164 tests).

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@kalverra
kalverra force-pushed the DX-5066/2-prsize-core branch 2 times, most recently from 87e3e53 to 030bad7 Compare September 1, 2026 20:10
@kalverra
kalverra marked this pull request as ready for review September 1, 2026 20:13
@kalverra
kalverra requested review from a team as code owners September 1, 2026 20:13
@cl-sonarqube-production

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube

@trunk-io

trunk-io Bot commented Sep 1, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

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