Skip to content

Commit 03aad7f

Browse files
committed
add check to ensure base and head are not the same when creating a new PR
1 parent 54ce61d commit 03aad7f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ui/src/apps/pr-write/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ function CreatePRApp() {
396396
if (!owner || !repo) { setError("Repository information not available"); return; }
397397
if (!baseBranch) { setError("Base branch is required"); return; }
398398
if (!headBranch) { setError("Head branch is required"); return; }
399+
if (baseBranch === headBranch) { setError("Base and head branches cannot be the same"); return; }
399400

400401
setIsSubmitting(true);
401402
setError(null);

0 commit comments

Comments
 (0)