Home / Function/ get_contributors() — fastapi Function Reference

get_contributors() — fastapi Function Reference

Architecture documentation for the get_contributors() function in contributors.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  fd24d1b1_d90e_7d94_aa7a_9cbcf808fa8a["get_contributors()"]
  cf4b5bfd_e515_e220_1b74_2b9dbfada762["contributors.py"]
  fd24d1b1_d90e_7d94_aa7a_9cbcf808fa8a -->|defined in| cf4b5bfd_e515_e220_1b74_2b9dbfada762
  33126480_1652_4075_be09_22addb8f6752["main()"]
  33126480_1652_4075_be09_22addb8f6752 -->|calls| fd24d1b1_d90e_7d94_aa7a_9cbcf808fa8a
  style fd24d1b1_d90e_7d94_aa7a_9cbcf808fa8a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/contributors.py lines 175–204

def get_contributors(pr_nodes: list[PullRequestNode]) -> ContributorsResults:
    contributors = Counter[str]()
    translation_reviewers = Counter[str]()
    translators = Counter[str]()
    authors: dict[str, Author] = {}

    for pr in pr_nodes:
        if pr.author:
            authors[pr.author.login] = pr.author
        is_lang = False
        for label in pr.labels.nodes:
            if label.name == "lang-all":
                is_lang = True
                break
        for review in pr.reviews.nodes:
            if review.author:
                authors[review.author.login] = review.author
                if is_lang:
                    translation_reviewers[review.author.login] += 1
        if pr.state == "MERGED" and pr.author:
            if is_lang:
                translators[pr.author.login] += 1
            else:
                contributors[pr.author.login] += 1
    return ContributorsResults(
        contributors=contributors,
        translation_reviewers=translation_reviewers,
        translators=translators,
        authors=authors,
    )

Domain

Subdomains

Called By

Frequently Asked Questions

What does get_contributors() do?
get_contributors() is a function in the fastapi codebase, defined in scripts/contributors.py.
Where is get_contributors() defined?
get_contributors() is defined in scripts/contributors.py at line 175.
What calls get_contributors()?
get_contributors() is called by 1 function(s): main.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free