def METHOD_NAME(self, repo, event):
    """
    Given a webhook payload, update stored repo data if needed.
    NB: Assumes event['repository']['full_name'] is defined. Rework this if
    that stops being a safe assumption.
    """
    name_from_event = event["repository"]["full_name"]
    # build the URL manually since it doesn't come back from the API in
    # the form that we need
    # see https://confluence.atlassian.com/bitbucket/event-payloads-740262817.html#EventPayloads-entity_repository
    # and click on 'Repository property' underneath the table for example data
    # (all entries are from the `api` subdomain, rather than bitbucket.org)
    url_from_event = f"https://bitbucket.org/{name_from_event}"
    if (
        repo.name != name_from_event
        or repo.config.get("name") != name_from_event
        or repo.url != url_from_event
    ):
        repo.update(
            name=name_from_event,
            url=url_from_event,
            config=dict(repo.config, name=name_from_event),
        )