orta / danger-plugin-spellcheck

Spell checks any created or modified code or markdown files in a GitHub PR
MIT License
26 stars 16 forks source link

Global edit URL hardcodes master #30

Open SamB opened 3 years ago

SamB commented 3 years ago

This seems to be the offending line:

https://github.com/orta/danger-plugin-spellcheck/blob/2861b2efa405f57a768d88fc314c9c5f305ee7a7/src/index.ts#L233

I wouldn't have expected this to be an actual problem, except when I followed the link from https://github.com/microsoft/TypeScript-Website/pull/1320#issuecomment-805835355 I got a 404 page.

Oh! It's a problem in that instance because there really is still a master branch lying around. Perhaps it ought to be renamed v1 ... still, might be a good idea to come up with a way for this plugin to actually link to the correct branch?

orta commented 3 years ago

edit urls have to have a branch reference like master, in theory we could use the GH api to check what the default branch is

otherguy commented 3 years ago

Now that GitHub defaults to main, this would make sense. We followed https://github.com/github/renaming and renamed all our master branches to main

glensc commented 2 years ago

I propose to use special HEAD instead. noticed this too when refactored in