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 #14232

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

Oreoxmt
Copy link
Collaborator

@Oreoxmt Oreoxmt commented Jul 14, 2023

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 version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

  • master (the latest development version)
  • v7.3 (TiDB 7.3 versions)
  • v7.2 (TiDB 7.2 versions)
  • v7.1 (TiDB 7.1 versions)
  • v7.0 (TiDB 7.0 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)
  • v5.2 (TiDB 5.2 versions)
  • v5.1 (TiDB 5.1 versions)
  • v5.0 (TiDB 5.0 versions)

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

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

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@Oreoxmt Oreoxmt added translation/no-need No need to translate this PR. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jul 14, 2023
@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 14, 2023
@Oreoxmt Oreoxmt marked this pull request as ready for review July 17, 2023 09:39
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 17, 2023
@Oreoxmt Oreoxmt added needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.0 needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels 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 bc49f29 into pingcap:master Jul 17, 2023
6 checks passed
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

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
@Oreoxmt Oreoxmt deleted the ci/prevent-deletion branch July 25, 2023 06:40
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-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. translation/no-need No need to translate this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants