Skip to content

Resolve "Test GitHub importer with Gogs"

username-removed-128633 requested to merge 22348-gitea-importer into master

What does this MR do?

It adds a brand new importer for Gitea!

This is a continuation of !6945 (closed) started by @bkc.

Gitea aims to be 100% GitHub-compatible but there's a few differences:

  • Gitea is not an OAuth provider (yet): https://github.com/go-gitea/gitea/issues/27
    • This means we cannot map Gitea users given an assignee ID => assignees are not set on imported issues and merge requests
  • No releases API for now: https://github.com/go-gitea/gitea/issues/330
  • API version is v1 (GitHub is v3)
  • The IID field for milestones is id compared to number in GitHub.
  • Issues, PRs, milestones, labels don't have a url field (the importer now fallback to '' in that case)

Known issues:

This is noted in the documentation:

Are there points in the code the reviewer needs to double check?

  1. I've made Import::GiteaController inherit from Import::GithubController since both controllers should be identical in the long-term and their current differences are small.
  2. I've added a base IssuableFormatter class from which IssueFormatter & PullRequestFormatter inherit
  3. I've added shared examples for GitHub/Gitea importer classes
  4. I've made Gitlab::ImportSources more robust and tested! 🎄
  5. I've added routing specs for import routes! 🎄

Screenshots

Usage

gitea-importer

Issues

Gitea GitLab
issues-gitea issues-gitlab
issue-gitea issue-gitlab

Pull/Merge requests

Gitea GitLab
prs-gitea mrs-gitlab
pr-gitea mr-gitlab

Labels

Gitea GitLab
labels-gitea labels-gitlab

Milestones

Gitea GitLab
milestones-gitea milestones-gitlab

Releases

Gitea GitLab
releases-gitea releases-gitlab

Does this MR meet the acceptance criteria?

Closes #22348 (closed)

Merge request reports