Skip to content

fix(action): drop broken author URL on direct-push stories#2

Merged
znat merged 1 commit intomainfrom
fix/direct-push-author-url
May 1, 2026
Merged

fix(action): drop broken author URL on direct-push stories#2
znat merged 1 commit intomainfrom
fix/direct-push-author-url

Conversation

@znat
Copy link
Copy Markdown
Owner

@znat znat commented May 1, 2026

Closes #1

What changes

Direct-push commits had no associated PR, so the analyzer fell back to constructing a GitHub URL from the git committer name:

```
https://github.com/Nathan%20Zylbersztejn
```

That 404s. Committer names are display names, not GitHub handles, and we have no reliable mapping without an additional GraphQL email→user lookup.

This PR drops the constructed URL entirely for `kind: 'direct-push'` stories. The `StoryCard` already has a fallback that renders the byline as plain text when `authorUrl` is missing, so no UI changes are needed.

PR-merge stories are unaffected — `pr.authorUrl` comes from GraphQL's verified `pr.author.url` and continues to render as a working link.

Test plan

  • `yarn workspace @gitpulse/action typecheck`
  • CI builds + deploys
  • Live site: direct-push story bylines render as plain text (no link), no broken `Nathan%20Zylbersztejn` URL
  • This very PR's resulting story renders as `kind: 'pr'` with linked-issue context (Issue Direct-push stories link broken author URLs #1)

Closes #1

Direct-push commits had no associated PR, so we fell back to
constructing a GitHub URL from the git committer name:

    https://github.com/${encodeURIComponent(commit.authorName)}

Committer names are display names ("Nathan Zylbersztejn"), not GitHub
handles — the resulting URL 404s. Drop the URL entirely for direct-push
commits; the StoryCard already has a fallback path that renders the name
as plain text when authorUrl is undefined.

PR-merge stories continue to work — pr.authorUrl comes from GraphQL's
verified pr.author.url.
@znat znat merged commit 0a1dbbc into main May 1, 2026
@znat znat deleted the fix/direct-push-author-url branch May 1, 2026 19:27
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.

Direct-push stories link broken author URLs

1 participant