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

feat(cherrypicker): add hold labels and comments when cp pr has conflicts #1192

Merged
merged 3 commits into from
Feb 6, 2025

Conversation

wuhuizuo
Copy link
Contributor

This pull request introduces enhancements to handle pull requests with conflicts more effectively in the cherrypicker plugin. The main changes involve detecting conflicts in the pull request diff and updating the pull request status and comments accordingly.

Conflict detection and handling:

  • Added a method isPrHasSoftConflict to check for conflict markers (<<<<<<<, =======, >>>>>>>) in the pull request diff. (F662793dL753R753)
  • Updated the handle method to detect conflicts in newly created pull requests and adjust the response message to inform users about the conflicts.
  • Inserted a "do-not-merge/hold" label to pull requests with conflicts to prevent merging. (F662793dL737R737)
  • Added a comment to notify the requestor about the conflicts and instruct them to resolve the issues or ask others for help, with a /unhold command to remove the hold label once resolved.

@ti-chi-bot ti-chi-bot bot requested review from Mini256 and purelind January 24, 2025 10:49
@ti-chi-bot ti-chi-bot bot added dco-signoff: yes Indicates the PR's author has signed the dco. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 24, 2025
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 61.33%. Comparing base (ac98cbf) to head (0447e8d).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...l/pkg/externalplugins/cherrypicker/cherrypicker.go 33.33% 9 Missing and 5 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1192       +/-   ##
===========================================
- Coverage   80.47%   61.33%   -19.14%     
===========================================
  Files          21       36       +15     
  Lines        3324     4402     +1078     
===========================================
+ Hits         2675     2700       +25     
- Misses        419     1466     +1047     
- Partials      230      236        +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Mini256 Mini256 removed their request for review January 24, 2025 12:43
Signed-off-by: wuhuizuo <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 6, 2025
@wuhuizuo
Copy link
Contributor Author

wuhuizuo commented Feb 6, 2025

/approve

@ti-chi-bot ti-chi-bot bot added the approved label Feb 6, 2025
Copy link

@purelind purelind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Contributor

ti-chi-bot bot commented Feb 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: purelind, wuhuizuo

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 lgtm label Feb 6, 2025
Copy link
Contributor

ti-chi-bot bot commented Feb 6, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-06 02:46:28.903862576 +0000 UTC m=+326260.436274559: ☑️ agreed by purelind.

@ti-chi-bot ti-chi-bot bot merged commit 2ac7cd7 into master Feb 6, 2025
5 of 7 checks passed
@ti-chi-bot ti-chi-bot bot deleted the feature/add-hold-when-cp-pr-has-conflicts branch February 6, 2025 02:52
wuhuizuo added a commit to PingCAP-QE/ee-ops that referenced this pull request Feb 6, 2025
ti-chi-bot bot pushed a commit to PingCAP-QE/ee-ops that referenced this pull request Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants