def projects_q(project):
    """Return the gerrit query selecting all the project in the given list

    :param project: List of gerrit project name.
    :type project: list of str
    :return:
        gerrit query according to `Searching Changes`_ section of gerrit
        documentation.
    :rtype: str

    .. _Searching Changes:
        https://review.openstack.org/Documentation/user-search.html
    """
    return ('('
            + ' OR '.join(['project:' + p for p in project['subprojects']])
            + ')')