INNER CODE UNIT · Python

mapPullRequest

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

def mapPullRequest(pullRequest, opts):
    title = pullRequest["title"].encode('ascii', 'backslashreplace').decode().replace("<", "\<")
    for regex in opts.template["autoformat"]:
        title = re.sub(regex["match"], regex["replace"], title)

    return {
        "title": title,
        "labels": list(map(lambda l: l["name"], pullRequest["labels"]))
    }


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"]:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…