INNER CODE UNIT · Python

is_in_section

mongodb/mongo-csharp-driver · evergreen/release-notes.py:50

def is_in_section(pullrequest, section):
    if section is None:
        return False
    if type(section) is str:
        return False
    if "exclude-labels" in section:
        for lbl in section["exclude-labels"]:
            if lbl in pullrequest["labels"]:
                return False

    if "labels" in section:
        if section["labels"] == "*":
            return True
        for lbl in section["labels"]:
            if lbl in pullrequest["labels"]:
                return True
        return False

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…