I work on OpenJDK. Here are some steps we've taken to not overly depend on GitHub:
1. Issues stay on a self-hosted JIRA.
2. All PRs get an automatically generated patch that's posted to the mailing list, and all comments are two-way mirrored between GH and the mailing list.
3. All links to commits in issues don't point directly at GH but at an indirection through our domain.
4. All bots work on both GH and GitLab
This means that we can move off of GH pretty much instantly if the need arises. But self hosting with GitLab just wouldn't serve our goals. We want speed all around the world, and we don't want to spend resources on administration.