Skip to content

Commit 1d58fea

Browse files
committed
shortcut when mergebase is the head commit
Signed-off-by: Andrew Thornton <[email protected]>
1 parent d686e09 commit 1d58fea

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

services/pull/patch.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ func TestPatch(pr *issues_model.PullRequest) error {
8888
}
8989
pr.MergeBase = strings.TrimSpace(pr.MergeBase)
9090

91+
if pr.HeadCommitID == pr.MergeBase {
92+
pr.Status = issues_model.PullRequestStatusEmpty
93+
return nil
94+
}
95+
9196
// 2. Check for conflicts
9297
if conflicts, err := checkConflicts(ctx, pr, gitRepo, tmpBasePath); err != nil || conflicts || pr.Status == issues_model.PullRequestStatusEmpty {
9398
return err

0 commit comments

Comments
 (0)