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)
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", )
def draft(ctx): """Draft reviews or with draft comments.""" ctx.obj.report(query=Query("draft"), title=draft.__doc__)
def watched(ctx): """Watched reviews based on server side filters""" ctx.obj.report(query=Query("watched"), title=watched.__doc__)
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)", )
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)")
def incoming(ctx): """Incoming reviews""" ctx.obj.report(query=Query("incoming"), title=incoming.__doc__)