Skip to content

Commit

Permalink
Add doctor orphan check for orphaned pull requests without an existin…
Browse files Browse the repository at this point in the history
…g base repo (go-gitea#19731)
  • Loading branch information
silentcodeg authored and AbdulrhmnGhanem committed Aug 23, 2022
1 parent df95e7c commit b376e4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/doctor/dbconsistency.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er
// find pulls without existing issues
genericOrphanCheck("Orphaned PullRequests without existing issue",
"pull_request", "issue", "pull_request.issue_id=issue.id"),
// find pull requests without base repository
genericOrphanCheck("Pull request entries without existing base repository",
"pull_request", "repository", "pull_request.base_repo_id=repository.id"),
// find tracked times without existing issues/pulls
genericOrphanCheck("Orphaned TrackedTimes without existing issue",
"tracked_time", "issue", "tracked_time.issue_id=issue.id"),
Expand Down

0 comments on commit b376e4f

Please sign in to comment.