def extract_common_args(req_args):
    """
  Pull common query parameter arguments out of a query string
  """
    project_filter = req_args.get('project', None)
    branch_filter = req_args.get('branch', None)
    try:
        offset = max(int(req_args['offset']), 0)
    except (KeyError, ValueError):
        offset = 0
    try:
        limit = min(int(req_args['limit']), 500)
    except (KeyError, ValueError):
        limit = 25
    return project_filter, branch_filter, offset, limit
