Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use canonical URL in utils.getRepoURL #26

Merged
merged 4 commits into from
Jul 24, 2020
Merged

Conversation

fregante
Copy link
Member

This should improve support of aNyCaSe/RePos across the board

@fregante fregante added the bug Something isn't working label Jul 23, 2020
@fregante fregante marked this pull request as ready for review July 23, 2020 18:20
@fregante
Copy link
Member Author

This seems to work everywhere except the Security page. GitHub reports https://github.com/ there.

Also, @busches can you verify that this meta tag exists on every repo page on GHE?

document.querySelector('[property="og:url"]').content

You can create a live expression in the console and just navigate the repo

@busches
Copy link
Member

busches commented Jul 24, 2020

@fregante Here ya go:

  • ghe.com/repo/pulls -> ghe.com/repo
  • ghe.com/repo/pull/1 -> ghe.com/repo/pull/1
  • ghe.com/repo/pull/1/commits -> ghe.com/repo/pull/1
  • ghe.com/repo/pull/1files -> ghe.com/repo/pull/1
  • ghe.com/repo/issues -> ghe.com/repo
  • ghe.com/repo/issues/1 -> ghe.com/repo/issues/1
  • ghe.com/pulls -> ghe.com
  • ghe.com/issues -> ghe.com
  • ghe.com/orgName -> ghe.com/orgName
  • ghe.com/orgs/orgName/people -> ghe.com/orgName

This was tested on 2.20. Let me know if you need any other specific test cases.

@fregante
Copy link
Member Author

All good, this only has to work on repo pages anyway. Thank you!

@fregante fregante merged commit 188b80e into master Jul 24, 2020
@fregante fregante deleted the canonical-getRepoURL branch July 24, 2020 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

None yet

2 participants