There is no API in GitHub to export a project. The import feature of GitLab is implemented by exploring the project (issues, pull requests etc.) and creating an equivalent in GitLab. Gitea is expected to provide the same API and the import uses the same logic.