New Feature·Pushed May 1, 2026·M
Direct-push commits now show clickable GitHub handles
Commits pushed directly to a branch now display the author's GitHub handle and a working profile link, instead of falling back to a plain display name.
When commits are pushed directly to a branch rather than merged through a pull request, the commit author's email can still match a GitHub account — GitHub resolves this automatically. The system now fetches this information via GraphQL, so direct-push commits display the author's verified GitHub login (like "@znat") with a clickable profile URL, identical to how commits from merged PRs appear.
Previously, direct-push stories showed only the git committer display name with no link. Now the author resolution follows a clear priority: first the PR author if available, then the commit author's GitHub user if found, and finally the display name as a fallback with no URL.
The change lives in the GitHub GraphQL query layer of the [[code]]@gitpulse/action[[/code]] codebase. Future stories will reflect this automatically; existing stories retain their old data until regenerated.
Technical description
This PR extends the commit context fetching to include GitHub user information for direct-push commits.
## The Problem
When commits are pushed directly to a branch (not through a merged PR), the system previously fell back to the git committer display name. This displayed as plain text with no URL, making it impossible to click through to the author's GitHub profile.
## The Solution
GitHub automatically resolves the commit author's email to a GitHub user when it matches a verified email on an account. This PR fetches that resolution via the new [[code]]Commit.author.user[[/code]] GraphQL field.
### Changes
The core change is in [[code ref=1]]fetchCommitContext[[/code]], which replaced [[code ref=1]]fetchPRForCommit[[/code]]. The return type shifted from [[code]]PRData | null[[/code]] to [[code ref=2]]CommitContext[[/code]], which contains both the PR data and the commit author information in a single GraphQL call.
The GraphQL query [[code ref=3]]COMMIT_CONTEXT_QUERY[[/code]] now requests:
````graphql
author {
user { login url }
}
associatedPullRequests(first: 1, orderBy: ...)
````
In [[code ref=4]]buildStoryFromCommit[[/code]] within render.ts, the author resolution logic was updated:
````typescript
const author = pr?.authorLogin ?? commitAuthor?.login ?? commit.authorName;
const authorUrl = pr?.authorUrl ?? commitAuthor?.url ?? undefined;
````
Priority: (1) PR author login → (2) Commit author GitHub user → (3) Git display name without URL.
The main orchestrator [[code ref=5]]processCommit[[/code]] in index.ts was updated to use the new context object throughout the pipeline, passing [[code]]ctx[[/code]] instead of just [[code]]pr[[/code]].
## Error Handling
On GraphQL failure, the method now returns [[code]]{ pr: null, commitAuthor: null }[[/code]] rather than throwing. This allows the pipeline to continue with the fallback display name rather than failing entirely.
## Files at a Glance
- [[code]]action/src/github.ts[[/code]] — Extended GraphQL query and new CommitContext return type
- [[code]]action/src/render.ts[[/code]] — Updated author resolution with three-tier priority
- [[code]]action/src/index.ts[[/code]] — Wired new context object through processing pipeline
Categories
- New Feature (70%) — Primary purpose: new user-facing capability enabling GitHub handle resolution for direct-push commits with working profile links
- Refactoring (30%) — Method renamed from fetchPRForCommit to fetchCommitContext with changed return type from PRData | null to CommitContext