# GitHub diff stat link for commits results in 404 link

**URL:** https://meta.discourse.org/t/github-diff-stat-link-for-commits-results-in-404-link/131114
**Category:** Bug
**Created:** [October 15, 2019, 9:52pm UTC](https://meta.discourse.org/t/github-diff-stat-link-for-commits-results-in-404-link/131114 "2019-10-15T21:52:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rugk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rugk/32/158661_2.png) [@rugk](https://meta.discourse.org/u/rugk)
#### Post date: [October 15, 2019, 9:52pm UTC](https://meta.discourse.org/t/github-diff-stat-link-for-commits-results-in-404-link/131114/1 "2019-10-15T21:52:03Z")

</div>

Here is a box:

[https://github.com/rugk/mastodon-simplified-federation/commit/f8dedaa250ce2ea1734731a107cbe25b24f660e9](https://github.com/rugk/mastodon-simplified-federation/commit/f8dedaa250ce2ea1734731a107cbe25b24f660e9)

## STR

Click on the diff summary (+6-7 in this case) here…

### What happens

404 error at [https://github.com/rugk/mastodon-simplified-federation/commit/f8dedaa250ce2ea1734731a107cbe25b24f660e9/files](https://github.com/rugk/mastodon-simplified-federation/commit/f8dedaa250ce2ea1734731a107cbe25b24f660e9/files)

### What should happen

Dunno. This is no PR, maybe this was made for PRs, where that link would make sense, but I don’t know where this should link to in case of commits… 🤔

The only thing I could imagine would be a direct link to the diff stat/summary on GitHub (if possible), i.e.:

 ![grafik](https://global.discourse-cdn.com/meta/original/3X/4/e/4ef07ec674d62f01cba10515e8ea490b3a01983e.png)

## Other

Possibly introduced by:

> [@Github onebox does not point to individual commits in PR links](https://meta.discourse.org/t/github-onebox-does-not-point-to-individual-commits-in-pr-links/55946):
>
> https://github.com/discourse/discourse/pull/4662/commits/706b4f6b9faf1f820a294e83f82b0b5a5dba0475 https://github.com/discourse/discourse/pull/4662 Both links generate the same onebox even though the first link is pointing to a particular commit in the PR.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [October 15, 2019, 10:06pm UTC](https://meta.discourse.org/t/github-diff-stat-link-for-commits-results-in-404-link/131114/2 "2019-10-15T22:06:49Z")

</div>

@david maybe you can have a look at this?

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [October 15, 2019, 10:07pm UTC](https://meta.discourse.org/t/github-diff-stat-link-for-commits-results-in-404-link/131114/3 "2019-10-15T22:07:21Z")

</div>

I think we might need to drop the `/files` from here, or pick a different location:

> <https://github.com/discourse/onebox/blob/main/templates/githubcommit.mustache#L25>

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [October 15, 2019, 10:09pm UTC](https://meta.discourse.org/t/github-diff-stat-link-for-commits-results-in-404-link/131114/4 "2019-10-15T22:09:11Z")

</div>

Yep, exactly @tshenry. I must have copy/pasted it from the PR onebox.

I’ll fix and bump onebox now

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [October 15, 2019, 11:54pm UTC](https://meta.discourse.org/t/github-diff-stat-link-for-commits-results-in-404-link/131114/5 "2019-10-15T23:54:49Z")

</div>


