Use the API to get the default branch #1557
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1173 #1132
This enables the "see on the default branch" button in a couple of situations:
Already supported
https://github.com/sindresorhus/refined-github/tree/visited (branch root)
https://github.com/sindresorhus/refined-github/tree/visited/media (branch folder)
Newly supported
https://github.com/bfred-it/refined-github/blob/visited/.gitattributes (fork, pre-existing branch)
https://github.com/bfred-it/refined-github/blob/default-branch-api/.gitattributes (fork, new branch)
https://github.com/Microsoft/ChakraCore/tree/v1.11.1 (tag)
https://github.com/Microsoft/vsts-tasks/tree/5ca661d47b0ebc6352d4c7697293f23f4f254971 (commit)
https://github.com/Microsoft/pxt-microbit/blob/FirmwareLink/.vscode/launch.json (file)