def merge()

in merge-data.py [0:0]


def merge(dict1, dict2):
    """
    Merges data from dict1 into dict2. Keys in dict1 take precedence if not None.
    Strips trailing newline from string values.
    """
    for key, value in dict1.items():
        if value is not None:
            if isinstance(value, str):
                dict2[key] = value.rstrip("\n")  # Strip trailing newlines
            else:
                dict2[key] = value
    dict2.pop('issue', None)  # Remove the 'issue' key after merging