ext_core.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:repocribro 作者: MarekSuchanek 项目源码 文件源码
def gh_event_push(db, repo, payload, actor):
    """Process GitHub PushEvent (with commits)

    https://developer.github.com/v3/activity/events/types/#pushevent

    :param db: Database to store push data
    :type db: ``flask_sqlalchemy.SQLAlchemy``
    :param repo: Repository where push belongs to
    :type repo: ``repocribro.models.Repository``
    :param payload: Data about push and commits
    :type payload: dict
    :param actor: Actor doing the event
    :type actor: dict
    """
    push = Push.create_from_dict(payload, actor, repo)
    db.session.add(push)
    for commit in push.commits:
        db.session.add(commit)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号