# Meta links to Github often broken

**URL:** <https://meta.discourse.org/t/meta-links-to-github-often-broken/85151>\
**Category:** Site feedback\
**Created:** [April 12, 2018, 11:59am UTC](https://meta.discourse.org/t/meta-links-to-github-often-broken/85151 "2018-04-12T11:59:35Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![notriddle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/notriddle/32/133055_2.png) [@notriddle](https://meta.discourse.org/u/notriddle)\
**Post date:** [April 12, 2018, 10:49pm UTC](https://meta.discourse.org/t/meta-links-to-github-often-broken/85151/4 "2018-04-12T22:49:52Z")

</div>

If you have a URL with this format:

```
https://github.com/:owner/:repo/blob/:commit/:file

```

You can figure out if it’s a permalink by hitting this URL:

```
https://api.github.com/repos/:owner/:repo/commits/:commit

```

If the returned SHA is equal to `:commit` itself, then it’s a permalink. Otherwise, it’s not. Personally, I’d just rewrite non-permalinks into permalinks automatically, though.

---

_[View the full topic](https://meta.discourse.org/t/meta-links-to-github-often-broken/85151)._
