#!/usr/bin/env bash
# open a browser to file stablereq 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=Stabilization&bug_severity=enhancement&short_desc=$("${scriptdir}"/urlencode <<<"${pkgs// /, }: stablereq")&cf_stabilisation_atoms=$("${scriptdir}"/urlencode <<<"${pkgs// /${nl}}")&keywords=CC-ARCHES&comment=Please+stabilize."
