Skip to content
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) #2420

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #2417

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 the git 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)

  • master (the latest development version)
  • v1.5 (TiDB Operator 1.5 versions)
  • v1.4 (TiDB Operator 1.4 versions)
  • v1.3 (TiDB Operator 1.3 versions)
  • v1.2 (TiDB Operator 1.2 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

…on workflow

Signed-off-by: Aolin <aolin.zhang@pingcap.com>
@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Jul 17, 2023

/approve

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 17, 2023

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Jul 17, 2023
@ti-chi-bot ti-chi-bot bot merged commit 1bffe7c into pingcap:release-1.5 Jul 17, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/cherry-pick-for-release-1.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants