-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix for changelog verifier and milestone setter automation #14369
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
Fix for changelog verifier and milestone setter automation #14369
Conversation
We can fetch all history using checkout actions itself using flag |
I'm happy to try this out, but I have some doubts it addresses the issue we're experiencing now. For example, take the failure here. In step 1, we What do you think @pseudo-nymous? |
Yes, fix here would fix the I haven't seen the first failure before ( |
Moved it to draft state to address all the failures first. |
@pseudo-nymous, I'm curious if you had any new thoughts on this. I think to test this properly, we would need two GitHub accounts each with their own fork of a repo trying to open a PR against one another. |
I think I have found the cause of the failure. It's related to fork repository checkout. When we checkout a fork's repository, github api gets linked to forked repo while github event payload is liked with apache repo. That's why when we try to fetch labels associated with PR, it fails since PR number does not exist in user's fork but in apache repo. I'm trying out a fix by using a second fork on my own fork. I'll update the PR with the fixes. |
I have been looking into this on my end as well. Agree that the issue arises when we have a PR straddling different forks and it sounds like you have a good theory about the underlying mechanism. Let me know about your findings! |
@pseudo-nymous, I have my proposed fix in #14606. Your thoughts on it are much appreciated! |
Sorry, I didn't get a chance to pick this up. |
My changes are not required now. Thus, closing this PR. |
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