Add CreatePullRequest action#42959
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @tommyming on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
CreatePullRequest action
|
@tommyming just following up to let you know the team went pretty deep in more git feature work and we got behind on PR reviews. We're ramping back up and appreciate the patience! 👍 |
|
@esthertrapadoux Thanks for the update! |
dinocosta
left a comment
There was a problem hiding this comment.
Hey @tommyming , thank you for opening this. This is a helpful feature, and the test inclusion is appreciated! ✌️
Overall the changes look good, but there are a couple of places where we can improve the implementation and a small edge case we’re not handling correctly. Let me know if you have any questions.
|
@dinocosta Thanks a lot for the review! |
dinocosta
left a comment
There was a problem hiding this comment.
Thank you for taking the time to tackle the feedback @tommyming ! I've just taken another look at the changes and it's looking good to me!
I've still left some comments on optional changes you could make, so let me know if you want to tackle those, otherwise I can go ahead and do that myself and get this merged 🚢
P.S.: You might want to merge main into this branch, as we've recently done some data migration so cargo run will fail in this branch in case you've got and older schema in your development database.
Thanks for the code enhancement review @dinocosta! Merry Christmas! |
when there are no PRs available.
clippy errors and earnings.
update pull request creation handling: check upstream branch first, local branch as fallback, code cleanup, follow coding styles.
6a553fc to
5622aa3
Compare
parent reference of GitHostingProviderRegistry
|
@dinocosta just committed, please review when you are free, or you can just edit after merge, both are fine for me. 😀 |
Fix issue in `GitPanel.create_pull_request` that panicked when showing an error toast. `show_error_toast` attempts to update the workspace, but the workspace is already borrowed when handling the `CreatePullRequest` action, causing "cannot update workspace::Workspace while it is already being updated". Use `cx.defer_in` to show the error toast after the current update cycle completes. Also remove an unused import and lowercase "Create Pull Request" to match other commands.
dinocosta
left a comment
There was a problem hiding this comment.
Thank you for tackling the proposed changes @tommyming !
While testing these new changes, I noticed that there was a panic when git: create pull request failed and the error toast should be shown. I ended up pushing 6873f2f to handle this and removed an unused import.
Will merge after CI/CD passes! ✌️
Closes zed-industries#42217 Release Notes: - Added/Fixed/Improved ... added "Create Pull Request" Command when searching on the command Palette For more details, please refer to the issue, thank you. --------- Co-authored-by: dino <dinojoaocosta@gmail.com>
Closes zed-industries#42217 Release Notes: - Added/Fixed/Improved ... added "Create Pull Request" Command when searching on the command Palette For more details, please refer to the issue, thank you. --------- Co-authored-by: dino <dinojoaocosta@gmail.com>
Closes zed-industries#42217 Release Notes: - Added/Fixed/Improved ... added "Create Pull Request" Command when searching on the command Palette For more details, please refer to the issue, thank you. --------- Co-authored-by: dino <dinojoaocosta@gmail.com>
Closes #42217
Release Notes:
git: create pull requestcommand to open a pull request for the current branchFor more details, please refer to the issue, thank you.