-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto truncate comment in release making process #12751
Comments
I took a quick look at this problem and I wanted to share what I learned: The release process owned by HashiCorp expects there to be an artifact, containing the release notes for a given release, uploaded to the repo containing the provider. This is the section of the GHA workflow for this repo that defines how the release notes are generated and then uploaded. The The Here's a clue to the problem I found about the issue: The command below is nested in the git checkout dbb48bed753b55ec4a1f6464111dbe75b12f757a
git describe --abbrev=0 --match='v*.*.*' --tags
#v4.40.0 ...it returns git describe --abbrev=0 --exclude="v4.40.0" --match='v*.*.*' --tags
# v4.27.0 I then found out about this command, which will "Only list tags whose commits are reachable from the specified commit (HEAD if not specified)". The grep avoids noise and focuses on recent history: git tag --merged | grep v4.
# v4.17.0
# v4.27.0
# v4.40.0 I believe this is the reason why old entries are found in the release notes! Either we need to get a clearer idea of the tagging & merging process or we need to work out a different process to generate that |
This solution seems hacky and still has the previous problem of needing to reliably discover the previous version tag
Edit: Getting tag names in reliable order is possible with git checkout v4.42.0
export LAST_TAG=$(git tag -l --sort=-version:refname |head -n 1)
export PREV_TAG=$(git tag -l --sort=-version:refname |head -n 2 | tail -n 1)
export PREV_VERSION=${PREV_TAG//v}
echo $LAST_TAG
# v4.42.0
echo $PREV_TAG
# v4.41.0
echo $PREV_VERSION
# 4.41.0
Edit 2: Possible solution but could be brittle as it assumes tags are added to the repo in the correct format and sequential order: git checkout 2178c996a562153ab06bf104a1bb1509ccb74510
# HEAD of main today
export PREV_TAG=$(git tag -l --sort=-version:refname |head -n 2 | tail -n 1)
export PREV_VERSION=${PREV_TAG//v}
sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $PREV_VERSION/q;p" CHANGELOG.md > release-notes.txt Note:
⭐ **Output release notes produced from above code block** ⭐
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
When making a release the release note thats generated contains a lot of unrelated content that the user needs to manually truncate. I would be nice to automatically detect and truncate this string before generating the note.
steps 4 and 7
https://github.com/hashicorp/terraform-provider-google/wiki/Release-Process#bug-on-duty
The text was updated successfully, but these errors were encountered: