pingcap / docs-tidb-operator

Documentation for TiDB on Kubernetes in both English and Chinese.
https://docs.pingcap.com/tidb-in-kubernetes
Other
46 stars 118 forks source link

ci: update the git diff command in the prevent deletion workflow to improve accuracy (#2417) #2419

Closed ti-chi-bot closed 1 year ago

ti-chi-bot commented 1 year ago

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)

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

Oreoxmt commented 1 year ago

/approve

ti-chi-bot[bot] commented 1 year ago

[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: - ~~[OWNERS](https://github.com/pingcap/docs-tidb-operator/blob/release-1.4/OWNERS)~~ [Oreoxmt] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment