merge
Merge contributors from multiple .all-contributorsrc files into a single list.
merge_contributions(first, second)
Return a sorted list of the contribution types for two contributor entries
Source code in all_all_contributors/merge.py
merge_contributors(contributors_list)
Merge multiple lists of contributor dictionaries into a single list.
This function takes a list of contributor dictionaries (typically from different .all-contributorsrc files) and merges them based on unique profile URLs. When multiple entries exist for the same contributor, their contributions are aggregated into a single entry.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
contributors_list
|
list[Contributor]
|
A list of contributor dictionaries. Each contributor dict should have at least 'profile' and 'contributions' keys. |
required |
Returns:
Type | Description |
---|---|
list[Contributor]
|
list[dict[str, Any]]: A list of merged contributor dictionaries, where each contributor appears only once with their combined contributions. |
Note
The function merges contributors based on merge._unique_key and aggregates contributions types.