8 if [[ -z "${GERRIT_USER}" || "${GERRIT_USER}" = "-h" || "${GERRIT_USER}" = "--help" ]]; then
9 echo "Usage: $0 <Gerrit username>"
13 if ! command -v jq
>/dev
/null
2>&1; then
14 echo "Error. Please install the package 'jq' before continuing."
19 ssh -p 29418 "${GERRIT_USER}@review.coreboot.org" gerrit
"$@"
24 message
="\'\"This patch has not been touched in over ${MESSAGE_AGE}. Anyone who wants to take over work on this patch, please feel free to restore it and do any work needed to get it merged. If you create a new patch based on this work, please credit the original author.\"\'"
26 echo "Abandoning ${patch}"
27 gerrit_cmd review
--project coreboot
--abandon --message "${message}" "${patch}"
31 gerrit_cmd query
--format=JSON
--no-limit --current-patch-set "repo:coreboot AND status:open AND ${QUERY_AGE}" | \
32 jq
-Mr '.currentPatchSet.revision' | \
36 for patch in $
(get_patchlist
); do abandon_patch
"${patch}"; done