blob: caceadc11e8100e0d9b50c1aff4f2ad83575c059 [file] [log] [blame]
#!/bin/bash
# -----------------------------------------------------------------------
# Copyright 2024 Open Networking Foundation Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -----------------------------------------------------------------------
# SPDX-FileCopyrightText: 2024 Open Networking Foundation Contributors
# SPDX-License-Identifier: Apache-2.0
# -----------------------------------------------------------------------
# Intent: Display command help
# -----------------------------------------------------------------------
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
function usage()
{
cat <<EOH
Usage: $0
--all r Load all metadata for a repository
--access Display gerrit ACLs
--dash(boad) Display my patch dashboard
--branch Admin branch URL
--crowd View crowd access roles for group
--crowd-all Group search (crowd)
--groups [g] View access roles for group.
--groups-all Group search (gerrit)
--me Alias for --user $USER
--repo Repository name
--serv Gerrit server name
--search
--unresolved Alias for --wip
--wip Query for open/unmerged patches.
--admins a
a=branches View repository branches
a=tags View repository tags
--patch [repo] Search for repository patches
--version v Artifact versions(s) to act on
v=master Mainline development
v=voltha-2.12 Artifact branch from a release
v=v2.12.0 Artifact tag derived from a release
v=v3.5.4 Artifact tag derived from VERSION file
--view v View a code repository:
repo View top level gerrit repository page (w/branch & tag)
search Gerrit repo search page
master View a branch
voltha-2.12 View a branch
v2.3.3 View a tag
[REVIEW]
--review Load pending code review requests
--review --me Load only my pending requests
--reviewer Load reviews by user
[FILTER(s)]
--age
--before Change time modified before (alias: --until)
--after Change time modified after (alias: --since)
--status [s] Filter query results by status={open,merged,closed}
s=open (is:open)
s=merged
-- user [u] Filter results by a list of users
[MODE(s)]
--debug
--help
[USAGE]
# Display my unmerged patches
% gerrit.sh --wip
# Display my unmerged patches
% gerrit.sh --wip --me
% gerrit.sh --repo voltha-go --admin tags --admin branches
# Search for umerged patches in repo:voltha-go
% gerrit.sh --repo voltha-go --search --wip
# Display new patches created since 'yesterday'
% gerrit.sh --wip --since '2024-04-24'
[HELP: Extended]
--help-status
EOH
return
}
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
function usage_verbose()
{
local switch="$1"; shift
case "$switch" in
--help-status) usage_status ;;
*) usage ;;
esac
return
}
# [EOF]