# Onebox: rewrite Github links to specific commit?

**URL:** <https://meta.discourse.org/t/onebox-rewrite-github-links-to-specific-commit/26090>\
**Category:** Feature\
**Created:** [7 Marzo 2015, 9:07am UTC](https://meta.discourse.org/t/onebox-rewrite-github-links-to-specific-commit/26090 "2015-03-07T09:07:12Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)\
**Post date:** [7 Marzo 2015, 9:41am UTC](https://meta.discourse.org/t/onebox-rewrite-github-links-to-specific-commit/26090/3 "2015-03-07T09:41:27Z")

</div>

The onebox gem wouldn’t. A background task in Discourse needs to do the heavy lifting. Using the commit that is closest but not after the post revision’s created\_at timestamp where the unresolved Github link was first introduced should be close enough.

For instance, regarding the link in question, this commit would apply:

> <https://github.com/discourse/discourse/blob/27e1a81b345d6d87a305860c8a0b63144dab2db6/app/models/site_setting.rb#L73>

---

_[View the full topic](https://meta.discourse.org/t/onebox-rewrite-github-links-to-specific-commit/26090)._
