Skip to content

fix: 修复解决拉取请求冲突时未更新主分支的问题#384

Merged
he0119 merged 3 commits intomainfrom
fix/resolve_pr
May 10, 2025
Merged

fix: 修复解决拉取请求冲突时未更新主分支的问题#384
he0119 merged 3 commits intomainfrom
fix/resolve_pr

Conversation

@BigOrangeQWQ
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 10, 2025 07:29
@github-actions github-actions Bot added the bug Something isn't working label May 10, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses an issue where the functionality responsible for resolving pull request conflicts was not correctly updating the local branch with the latest remote changes.

  • Added a "git pull origin master" command in tests to simulate fetching the latest remote branch.
  • Introduced a new update_branch method in the git handler and integrated it into the publish utility to update the branch before checkout.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/plugins/github/resolve/test_resolve_pull_request.py Added a git pull command to ensure tests fetch the latest remote branch.
src/plugins/github/plugins/publish/utils.py Updated the branch before checkout by adding a call to handler.update_branch.
src/plugins/github/handlers/git.py Added an update_branch method to execute a git pull for the specified branch.

Comment thread tests/plugins/github/resolve/test_resolve_pull_request.py Outdated
Comment thread src/plugins/github/handlers/git.py Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.67%. Comparing base (c087c10) to head (cc9c594).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #384   +/-   ##
=======================================
  Coverage   93.67%   93.67%           
=======================================
  Files          41       41           
  Lines        2276     2278    +2     
=======================================
+ Hits         2132     2134    +2     
  Misses        144      144           

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

@BigOrangeQWQ BigOrangeQWQ requested a review from he0119 May 10, 2025 07:35
@he0119 he0119 changed the title fix: 修复合并拉取请求时,负责解决拉取请求冲突的功能未能获取最新的远程分支的问题 fix: 修复解决拉取请求冲突时未更新主分支的问题 May 10, 2025
@he0119 he0119 merged commit 2f1f897 into main May 10, 2025
7 checks passed
@he0119 he0119 deleted the fix/resolve_pr branch May 10, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants