Fix for changelog verifier and milestone setter automation #14369
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request contains a fix for changelog automation that has been added recently. We have seen failures where either diff calculation wrt base commit was wrong or base commit was not even available leading to fatal error.
This happens because we are using
pull_request_target
event type which checks outmerge base commit
where as we want to checkouthead commit
to do proper diff calculation wrt changelog file. My initial testing was based onpull_request
which worked as expected since it checkoutsmerge head commit
.We tried a fix for this here: #14355. But we didn't fetch the full history appropriately. This PR adds a fix for this by pulling all the associated history using
git pull --unshallow origin ${{ github.event.pull_request.head.ref }}
.Tested all the changes here: pseudo-nymous#22
Addresses: #13898 #14190