Meta links to Github often broken

(Ryan Erwin) #1

You can find a lot of references to code in github as you browse through, but many of the links no longer work…

I think one solution would be to require that a github permalink is posted (or at least warn the poster when their github link is not a permalink).

I’ve come across dozens of them today. For example, see “How Discourse Stays Online - (Message Bus, Faye, Long Polling)

You just hit y to get a Permalink on Github.

So many broken links makes meta more difficult to use. Considering these links are typically posted by the Discourse founders, all the more likely to be followed into the future…

There are probably some exceptions that you’re 99% sure will stay around, such as, but search for “” and see how many of these are no longer valid.

(Régis Hanol) #2

I don’t know when the permalink feature was added but I only knew about it with this announcement

The post you mentioned is far older than that announcement :wink:

(Matt Palmer) #3

Yes, links break over time. This is not specific to meta, or Discourse, or even Github. Does Github provide a stable means of determining whether a URL is a permalink based on its structure? If not, it’s going to be awfully tricky to implement a warning.

(Michael Howell) #4

If you have a URL with this format:

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

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.