Sometimes, the release process might be broken due to the remote maven central server is not stable and we need to rerun the light-bot task again. Given that the logic is to skip the changelog update if the current tag is already in the CHANGELOG.md, we won't have a chance to overwrite the content for the current release.
Let's change the logic a little to remove the content for the current tag and regenerate the content again from the git repository. This can make the entire process idempotent so that we can run it again and again.
Sometimes, the release process might be broken due to the remote maven central server is not stable and we need to rerun the light-bot task again. Given that the logic is to skip the changelog update if the current tag is already in the CHANGELOG.md, we won't have a chance to overwrite the content for the current release.
Let's change the logic a little to remove the content for the current tag and regenerate the content again from the git repository. This can make the entire process idempotent so that we can run it again and again.