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

Requests to any path in an empty GitHub repo return 200, which cause us to identify empty repos as FSHy #4

Open
masnick opened this issue Nov 25, 2020 · 2 comments

Comments

@masnick
Copy link
Collaborator

masnick commented Nov 25, 2020

We use HEAD requests to a path on github.com to determine whether there are FSH folders in a repo. If the repo is empty, these requests will return 200 even though nothing is there.

To resolve, Util.github_repo_exists should be modified to make sure the repo isn't empty.

@masnick
Copy link
Collaborator Author

masnick commented Nov 25, 2020

Actually using the API to get the list of branches may mitigate this in practice, but regardless it should be cleaned up so Util.github_path_exists does what it says on the tin.

@cmoesel
Copy link

cmoesel commented Nov 25, 2020

If you use the GH API $org/repos call to get the list of repos from an org, you can look at the size property of the repo. It will be 0 if it is an empty repo. You may also want to consider the archived and disabled flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants