← gitpulse
New Feature·Pushed May 1, 2026·M

GitPulse gains PR classification, size pills, and linked issues

GitPulse now distinguishes between merged PRs and direct pushes, enriches stories with linked issues and author info, and displays a size indicator so reviewers instantly gauge change scope.

GitPulse can now tell the difference between commits that landed via pull request and those pushed directly to the default branch. When a commit is part of a merged PR, the analyzer fetches the full PR context — title, body, linked issues, and GitHub-reported metrics like additions, deletions, and files changed. For direct pushes, the system notes this explicitly so the LLM understands the context. Every story now carries a size assessment. Changes are classified as XS (under 10 lines), Small, Medium, Large, or XL, based on total lines changed and file count. The site displays a small pill with the size label; hovering reveals the reasoning, such as "Large change: 850 lines across 12 file(s). May benefit from splitting." Size thresholds are configurable via workflow input for teams with different review standards. The analysis happens in the [[code]]action[[/code]] workspace. The GitHub GraphQL client queries [[code]]Commit.associatedPullRequests[[/code]] to find the linked PR. For public repositories, the default [[code]]GITHUB_TOKEN[[/code]] works; private repos may need a personal access token with [[code]]repo[[/code]] and [[code]]read:org[[/code]] scopes.
Technical description
GitPulse now classifies commits as either merged PRs or direct pushes and attaches a visible size indicator to each story. A new GraphQL client in [[code ref=1]]action/src/github.ts[[/code]] queries GitHub's API for each commit. The [[code ref=2]]fetchPRForCommit[[/code]] function fetches PR metadata including title, body, author, additions/deletions/files-changed metrics, and any issues closed by the PR via [[code]]closingIssuesReferences[[/code]]. The client returns [[code]]null[[/code]] for commits with no associated PR (direct pushes). In [[code ref=3]]action/src/index.ts[[/code]], each commit is checked against the GraphQL API. If a PR is found, [[code ref=4]]formatPRContext[[/code]] formats the prompt with full PR details and linked issues. If not, [[code]]formatCommitAsPRContext[[/code]] marks it as a direct push so the LLM has accurate context. The [[code ref=5]]action/src/size.ts[[/code]] module implements rule-based size assessment. It classifies changes by total lines (additions + deletions) and file count: ````typescript file=action/src/size.ts export const DEFAULT_SIZE_THRESHOLDS = { xs: { maxLines: 10, maxFiles: 1 }, small: { maxLines: 100, maxFiles: 5 }, medium: { maxLines: 500, maxFiles: 15 }, large: { maxLines: 1000, maxFiles: 30 }, }; ```` The [[code ref=6]]parseThresholds[[/code]] function allows partial JSON overrides via the [[code]]GITPULSE_SIZE_THRESHOLDS[[/code]] environment variable. This lets teams customize thresholds without forking the code. [[code ref=7]]buildStoryFromCommit[[/code]] in [[code ref=4]]action/src/render.ts[[/code]] now differentiates PR merges from direct pushes: - Story ID is [[code]]pr-{number}[[/code]] for merges, [[code]]commit-{sha7}[[/code]] for direct pushes - PR author/URL preferred over git committer when available - Story type extended with [[code]]sizeAssessment[[/code]], [[code]]sizeReasoning[[/code]], [[code]]additions[[/code]], [[code]]deletions[[/code]], [[code]]filesChanged[[/code]] The [[code ref=7]]site/src/components/StoryCard.tsx[[/code]] renders a size pill on the meta row with the label (XS/S/M/L/XL) and size reasoning as the title attribute. The [[code ref=8]].github/workflows/analyze.yml[[/code]] workflow exposes: - [[code]]size-thresholds[[/code]]: Optional JSON for threshold overrides - [[code]]GITHUB_TOKEN[[/code]]: Passed through for the GraphQL call (uses runner's default token for public repos) **Files at a Glance:** - [[code]].github/workflows/analyze.yml[[/code]] — workflow inputs for size thresholds and token exposure - [[code]]action/src/github.ts[[/code]] — GraphQL PR lookup client - [[code]]action/src/size.ts[[/code]] — rule-based size assessment with threshold parsing - [[code]]action/src/index.ts[[/code]] — main loop now fetches PR data and computes stats - [[code]]action/src/render.ts[[/code]] — story building with PR vs. direct-push distinction - [[code]]action/src/commit-context.ts[[/code]] — PR context and direct-push context formatters - [[code]]action/src/llm.ts[[/code]] — summarizer now accepts pre-formatted context string - [[code]]site/src/lib/stories.ts[[/code]] — Story type extended with size fields and label helper - [[code]]site/src/components/StoryCard.tsx[[/code]] — size pill display

Categories

  • New Feature (80%)Adds PR classification via GraphQL, size assessment with UI display, and linked issue detection — new capabilities for users and the site
  • Configuration (20%)New workflow inputs (size-thresholds) and environment variable passthrough (GITHUB_TOKEN, GITPULSE_SIZE_THRESHOLDS)