#!/usr/bin/env bash
# open a browser to file rekeywordreq for package(s) ${*}
# (c) 2020-2024 Michał Górny <mgorny@gentoo.org>
# SPDX-License-Identifier: GPL-2.0-or-later

set -e

scriptdir=${BASH_SOURCE%/*}
pkgs=${*}
nl=$'\n'
exec xdg-open "https://bugs.gentoo.org/enter_bug.cgi?product=Gentoo%20Linux&component=Keywording&bug_severity=enhancement&short_desc=$("${scriptdir}"/urlencode <<<"${pkgs// /, }: rekeyword")&cf_stabilisation_atoms=$("${scriptdir}"/urlencode <<<"${pkgs// /${nl}}")&keywords=CC-ARCHES&comment=Please+restore+keywords."
