File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -166,10 +166,27 @@ commit_and_push_changelog() {
166166 if [[ " ${previous_version_ref,,} " == " null" ]]; then
167167 commit_msg=" ${commit_msg} (hotfix - no test plan)"
168168 fi
169- if ! git commit -am " ${commit_msg} " ; then
169+
170+ local changes_committed=false
171+ if git commit -am " ${commit_msg} " ; then
172+ changes_committed=true
173+ else
170174 echo " No changes detected; skipping commit."
171175 fi
172176
177+ # Check if there are any differences between the changelog branch and release branch
178+ if ! ${changes_committed} ; then
179+ echo " Checking for differences between ${changelog_branch} and ${release_branch} .."
180+ if ! git diff --quiet " origin/${release_branch} " " HEAD" ; then
181+ echo " Differences found between branches; proceeding with PR creation."
182+ else
183+ echo " No differences between ${changelog_branch} and ${release_branch} ."
184+ echo " Branches are already in sync; skipping PR creation."
185+ echo " Changelog workflow completed successfully (no updates needed)."
186+ return 0
187+ fi
188+ fi
189+
173190 local pr_body=" This PR updates the change log for ${version} ."
174191 if [[ " ${previous_version_ref,,} " == " null" ]]; then
175192 pr_body=" ${pr_body} (Hotfix - no test plan generated.)"
You can’t perform that action at this time.
0 commit comments