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

Merged
merged 1 commit into from
Jul 17, 2023
Merged

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

merged 1 commit into from
Jul 17, 2023

Conversation

Oreoxmt
Copy link
Collaborator

@Oreoxmt Oreoxmt commented Jul 17, 2023

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 Oreoxmt added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. needs-cherry-pick-release-1.2 Should cherry pick this PR to release-1.2 branch. needs-cherry-pick-release-1.3 Should cherry pick this PR to release-1.3 branch. needs-cherry-pick-release-1.4 Should cherry pick this PR to release-1.4 branch. needs-cherry-pick-release-1.5 Should cherry pick this PR to release-1.5 branch. labels Jul 17, 2023
@ti-chi-bot ti-chi-bot bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 17, 2023
@ran-huang ran-huang added the lgtm label Jul 17, 2023
@Oreoxmt
Copy link
Collaborator Author

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 640ee37 into pingcap:master Jul 17, 2023
11 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-1.3: #2418.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-1.4: #2419.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-1.5: #2420.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-1.2: #2421.

ti-chi-bot bot pushed a commit that referenced this pull request Jul 17, 2023
ti-chi-bot bot pushed a commit that referenced this pull request Jul 17, 2023
ti-chi-bot bot pushed a commit that referenced this pull request Jul 17, 2023
ti-chi-bot bot pushed a commit that referenced this pull request Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-1.2 Should cherry pick this PR to release-1.2 branch. needs-cherry-pick-release-1.3 Should cherry pick this PR to release-1.3 branch. needs-cherry-pick-release-1.4 Should cherry pick this PR to release-1.4 branch. needs-cherry-pick-release-1.5 Should cherry pick this PR to release-1.5 branch. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants