

def build_message_from_gitlog(user_profile, name, ref, commits, before, after, url, pusher, forced=None, created=None):
    short_ref = re.sub('^refs/heads/', '', ref)
    subject = name
    if re.match('^0+$', after):
        content = ('%s deleted branch %s' % (pusher, short_ref))
    elif ((forced and (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, short_ref[: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/VarMisuse@117/185 `after`->`short_ref`