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

Automatically search instead of prompting the user #2

Open
SidneyNemzer opened this issue Aug 9, 2020 · 0 comments
Open

Automatically search instead of prompting the user #2

SidneyNemzer opened this issue Aug 9, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@SidneyNemzer
Copy link
Owner

SidneyNemzer commented Aug 9, 2020

Background: When GIT REVEAL finds a site with a server: github.com header and a custom domain (not *.github.io), we know it is a GitHub pages site. Currently GIT REVEAL gives the user a link to search Github for the domain. Since Github requires a CNAME file with the domain in it, there's a pretty good chance we will find it with a search.

New Feature: Instead of giving the user a link, GIT REVEAL should use the Github API to perform the search. The GitHub search API has pretty strict rate limiting, so there will need to be logic to fall back to showing the search URL if we have hit the limit.

Implementation notes:

  • It is possible multiple repositories have a CNAME with the domain. We should sort by "least recently indexed" because that should give us the oldest file, which is likely the repository that the site points to. (The search URL we give the user should do this too, if possible).
  • CNAME files might have multiple domains (example)
  • If the search returns no results, we can be confident that the repository is private
  • We cannot tell if the repo is private but there are other results. This is probably rare though.
  • Maybe this search should be delayed until the user clicks on the extension. We can set the icon to active when the header is detected. The outcome might not turn up a result, so maybe the icon should change to orange in that case.
@SidneyNemzer SidneyNemzer added the enhancement New feature or request label Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant