Skip to content

Commit e82db15

Browse files
authored
Add doctor orphan check for orphaned pull requests without an existing base repo (#19731)
1 parent 9ea9206 commit e82db15

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/doctor/dbconsistency.go

+3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er
105105
// find pulls without existing issues
106106
genericOrphanCheck("Orphaned PullRequests without existing issue",
107107
"pull_request", "issue", "pull_request.issue_id=issue.id"),
108+
// find pull requests without base repository
109+
genericOrphanCheck("Pull request entries without existing base repository",
110+
"pull_request", "repository", "pull_request.base_repo_id=repository.id"),
108111
// find tracked times without existing issues/pulls
109112
genericOrphanCheck("Orphaned TrackedTimes without existing issue",
110113
"tracked_time", "issue", "tracked_time.issue_id=issue.id"),

0 commit comments

Comments
 (0)