From b7631d865430bad77f0f82a95e8ba557dfc57f84 Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Wed, 14 Sep 2022 17:10:07 +0200 Subject: [PATCH 1/2] .github: correctly generate Go changelog Recently Go Github Actions started not creating changelog at all. Add the missing code to the go-apply-patch to correctly generate changelog. --- .../coreos-overlay/.github/workflows/go-apply-patch.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/go-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/go-apply-patch.sh index b34b28692d..fa3b8ce394 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/go-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/go-apply-patch.sh @@ -60,6 +60,10 @@ for version_short in "${!VERSIONS[@]}"; do popd >/dev/null || exit + URL="https://go.dev/doc/devel/release#${VERSION_NEW}" + + generate_update_changelog 'Go' "${VERSION_NEW}" "${URL}" 'go' + generate_patches dev-lang go Go ((START_NUMBER++)) done From 66920fda77a73ef4d9baa18a4bf353f6f0ad3bdc Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Thu, 15 Sep 2022 11:07:05 +0200 Subject: [PATCH 2/2] .github: do not create a pull request when branch exists If git show-ref returns an error, i.e. the branch already exists, then we should not create a pull request, but simply return error. Otherwise, the Github Actions would always try to create pull requests even when the branch still exists. --- .../src/third_party/coreos-overlay/.github/workflows/common.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/common.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/common.sh index 6c6e1ba0cd..363c650e3a 100644 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/common.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/common.sh @@ -70,6 +70,7 @@ function checkout_branches() { if git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" show-ref "remotes/origin/${TARGET_BRANCH}"; then echo "Target branch already exists. exit."; + return 1 fi # Each submodule directory should be explicitly set from BASE_BRANCH,