Add owners of parent GitHub repos to authors #2922
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.
Motivation
The
author
property of a module can be a string or an array of strings. It's courteous to credit everyone who has maintained a mod over the years by listing them in an array.It is somewhat common for a mod on GitHub to go out of maintenance and be adopted by a new maintainer on a fork of the original repo. When this happens, we switch the
$kref
to the new repo, and in order to preserve the full list of authors, we have to manually edit theauthor
property to include them. It's better to rely on automatic data generation where possible, or at least to have the option.Changes
Now if a repo is a fork-of-a-fork-of-a-fork-of..., we will traverse the parent repository chain all the way to the root and add all of the repository owners as co-authors. This will give a more accurate picture of who has contributed when a repo is forked.
Note that manual overrides of the
author
property still work the same, so this logic will not blow away any manually maintained author lists. To minimize the performance hit, we will not make any extra GitHub API calls when theauthor
property is manually set in the netkan.