def build_message_from_gitlog(user_profile, name, ref, commits, before, after, url, pusher, forced=None, created=None):
    short_ref = re.sub(r'^refs/heads/', '', ref)
    subject = name

    if re.match(r'^0+$', after):
        content = '%s deleted branch %s' % (pusher,
                                            short_ref)
    # 'created' and 'forced' are github flags; the second check is for beanstalk
    elif (forced or not created) or (forced is None and len(commits) == 0):
        content = ('%s [force pushed](%s) to branch %s.  Head is now %s'
                   % (pusher,
                      url,
                      short_ref,
                      after[:7]))
    else:
        content = build_commit_list_content(commits, short_ref, url, pusher)

    return subject, content
dataset/ETHPy150Open zulip/zulip/zerver/views/webhooks/github.py/build_message_from_gitlog/operator `and` -> `or`