-
Notifications
You must be signed in to change notification settings - Fork 120
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
ci: update the git diff command in the prevent deletion workflow to improve accuracy #2417
Conversation
…on workflow Signed-off-by: Aolin <aolin.zhang@pingcap.com>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Oreoxmt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
First-time contributors' checklist
What is changed, added, or deleted? (Required)
Fix an issue that the
prevent-deletion.yaml
workflow mistakenly detects image deletions when images are added or removed in the PR's base branch. The root cause of this issue is that the workflow directly compares the latest commit of the PR base branch with the latest commit of the PR.This PR improves the accuracy of the image deletion detection script by adding the
--merge-base
option to thegit diff
command. This change ensures that git calculates the changes from the shared starting point of the HEAD and the PR head SHA.Which TiDB Operator version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?