예제 #1
0
파일: __main__.py 프로젝트: pycontribs/gri
def owned(ctx):
    """Changes originated from current user (implicit)"""
    # query = "status:open"
    # query += f" owner:{ctx.obj.user}"
    if ctx.obj.user == "self":
        title = "Own reviews"
    else:
        title = f"Reviews owned by {ctx.obj.user}"
    ctx.obj.report(query=Query("owned"), title=title)
예제 #2
0
파일: __main__.py 프로젝트: pycontribs/gri
def abandon(ctx, age):
    """Abandon changes (delete for drafts) when they are >90 days old
    and with very low score. Requires -f to perform the action."""

    ctx.obj.report(
        query=Query("abandon", age=age),
        title=f"Reviews to abandon ({age}d)",
        max_score=1.0,
        action="abandon",
    )
예제 #3
0
파일: __main__.py 프로젝트: pycontribs/gri
def draft(ctx):
    """Draft reviews or with draft comments."""
    ctx.obj.report(query=Query("draft"), title=draft.__doc__)
예제 #4
0
파일: __main__.py 프로젝트: pycontribs/gri
def watched(ctx):
    """Watched reviews based on server side filters"""
    ctx.obj.report(query=Query("watched"), title=watched.__doc__)
예제 #5
0
파일: __main__.py 프로젝트: pycontribs/gri
def project_merged(ctx, age, project_name):
    """Merged by project in the last number of days"""
    ctx.obj.report(
        query=Query("project_merged", age=age, project_name=project_name),
        title=f"Project Merged Reviews ({age}d)",
    )
예제 #6
0
파일: __main__.py 프로젝트: pycontribs/gri
def merged(ctx, age):
    """Merged in the last number of days"""
    ctx.obj.report(query=Query("merged", age=age), title=f"Merged Reviews ({age}d)")
예제 #7
0
파일: __main__.py 프로젝트: pycontribs/gri
def incoming(ctx):
    """Incoming reviews"""
    ctx.obj.report(query=Query("incoming"), title=incoming.__doc__)