GitHub Importer - Migrate issue 'closed/reopened' events
Release Notes
We continue to improve the GitHub project importer and add more meta data to it. In this milestone we added events history of closing and reopening issues, so related events in GitHub issues will be migrated to GitLab issues.
Problem to solve
When migrating projects from GitHub to GitLab, the issues are imported including any comments. However, any history/events are not migrated over. This means that, after the migration, the users would not be able to see who added/removed labels, milestones, assignees, etc.
For some users this is a dealbreaker that would prevent them from migrating to GitLab.
Proposed solution
During project import from GitHub, for each imported issue, check if any events of type closed
or reopened
exist for that issue and create corresponding events in GitLab.
Screenshots
These images illustrate the expected result in GitLab for each event in GitHub:
GitHub |
|
GitLab |
---|---|---|
|
||
|
👣 This issue
This issue is to migrate the following events:
-
closed
- This event is triggered when an issue is closed.
- GitHub API doc: https://docs.github.com/en/developers/webhooks-and-events/events/issue-event-types#closed
-
reopened
- This event is triggered when an issue is reopened.
- GitHub API doc: https://docs.github.com/en/developers/webhooks-and-events/events/issue-event-types#reopened
Iteration plan
-
👣 GitHub Importer - Migrate issue 'closed/reopene... (#354234 - closed) - THIS ISSUE -
👣 GitHub Importer - Migrate issue 'un/labeled' ev... (#354235 - closed) -
👣 GitHub Importer - Migrate issue 'de/milestoned'... (#354236 - closed) -
👣 GitHub Importer - Migrate issue 'cross-referenc... (#354238 - closed) -
👣 GitHub Importer - Migrate issue 'un/assigned' e... (#354237 - closed) -
👣 GitHub Importer - Migrate issue 'renamed' events (#354239 - closed)
Technical details
- we can use
GET
/repos/{owner}/{repo}/issues/{issue_number}/events to get a list of events for an issue
Documentation
-
📖 User doc: https://docs.gitlab.com/ee/user/project/import/github.html -
📖 Developer doc: https://docs.gitlab.com/ee/development/github_importer.html