mirror of
https://github.com/bitnami/charts.git
synced 2026-03-07 08:07:55 +08:00
[bitnami/*] ci: 👷 Fix broken commit links in changelogs (#26323)
* [bitnami/*] ci: 👷 Fix broken commit links in changelogs Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * refactor: ♻️ Use better variable nabe Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> --------- Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
This commit is contained in:
committed by
GitHub
parent
4642f3517f
commit
2d1862b5a7
5
.github/workflows/ci-pipeline.yml
vendored
5
.github/workflows/ci-pipeline.yml
vendored
@@ -137,6 +137,11 @@ jobs:
|
||||
changelog_tmp="$GITHUB_WORKSPACE/charts/bitnami/${CHART}/CHANGELOG.md.tmp"
|
||||
touch "$changelog_file"
|
||||
npx conventional-changelog-cli -i ${changelog_file} -s -t ${CHART}/ -r 0 --commit-path bitnami/${CHART}
|
||||
# The tool uses short sha to generate commit links. Sometimes, Github does not offer links with the short sha, so we change all commit links to use the full sha instead
|
||||
for short_sha in $(grep -Eo "/commit/[a-z0-9]+" ${changelog_file} | awk -F/ '{print $3}'); do
|
||||
long_sha="$(git rev-parse $short_sha)";
|
||||
sed -i "s%/commit/$short_sha%/commit/$long_sha%g" ${changelog_file};
|
||||
done
|
||||
cd $GITHUB_WORKSPACE/charts
|
||||
# Remove unreleased section (includes all intermediate commits in the branch) and create future entry based on PR title
|
||||
# The unreleased section looks like this "## (YYYY-MM-DD)" whereas a released section looks like this "## 0.0.1 (YYYY-MM-DD)"
|
||||
|
||||
Reference in New Issue
Block a user