This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
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.
Background
GitHub makes it easy to "fork" a project, and many KSP mods have changed ownership by way of new maintainers working on new forks. When this happens, we change the
$kref
value to point to the new fork.Problem
As noted in #67, only the current fork is included in the download counts. If an older fork had a lot of downloads, our download count number will not represent the true number of downloads for that mod.
Changes
Now we check whether each GitHub repo has a parent fork. If so, then we add its download count to the mod's overall count, and so on until we reach the original fork. This will include more "historical" downloads in the count.
Caveat: If a mod has been hosted in a series of forks that do not have a (grand...-)parent relationship with the current fork, then some of their downloads still will not be counted. For example: