def fetch_committers()

in scripts/fetch_contributors_and_team.py [0:0]


def fetch_committers(team_members):
    """
    Fetch GitHub committers from the repository since the fork date.
    Only includes users who are part of the specified team.
    """
    print(f"Fetching committers since fork date: {FORK_DATE}...")
    committers = set()
    params = {"per_page": 100, "page": 1, "since": FORK_DATE}

    while True:
        sys.stdout.write(f"Processing page {params['page']} of committers...\r")
        sys.stdout.flush()

        response = requests.get(COMMITS_URL, headers=HEADERS, params=params)
        if response.status_code != 200:
            print(f"\nError fetching committers: {response.status_code}, {response.text}")
            break

        commits = response.json()
        if not commits:
            break

        for commit in commits:
            committer = commit.get("committer")
            if committer:
                username = committer.get("login")
                if username and username in team_members:
                    committers.add(username)

        params["page"] += 1

    sys.stdout.write("\n")
    print(f"Found {len(committers)} unique committers.")
    return committers