opentofu/scripts/changelog-links.sh
Martin Atkins 94ff15fe5b Script to linkify github issue references in CHANGELOG.md
This fixes #4439 by making a compromise: the issues under the "unreleased"
heading will still not be links, because it's inconvenient for the
committers team to write out those links manually for each merge. However,
we'll run this script on release so that all of the *released* changes
are presented as clickable links, so people can quickly read through the
set of changes in each new release.
2016-02-24 17:34:14 -08:00

17 lines
595 B
Bash
Executable File

#!/bin/bash
# This script rewrites [GH-nnnn]-style references in the CHANGELOG.md file to
# be Markdown links to the given github issues.
#
# This is run during releases so that the issue references in all of the
# released items are presented as clickable links, but we can just use the
# easy [GH-nnnn] shorthand for quickly adding items to the "Unrelease" section
# while merging things between releases.
set -e
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
cd "$SCRIPT_DIR/.."
sed -ri 's/\[GH-([0-9]+)\]/\(\[#\1\]\(https:\/\/github.com\/hashicorp\/terraform\/issues\/\1\)\)/' CHANGELOG.md