Include release authors during Github imports
What does this MR do and why?
Fixes Github Import releases to have author_id
.
This is second MR for issue #343448 (closed) . The first MR !89694 (merged) covers author_id
validation for releases model.
See related discussion: #343448 (comment 985979730)
Each of these MR's will have its own feature flag rollout. The idea is to enable Github importer fix, observe production data and then enable the validation feature flag.
Screenshots or screen recordings
fix-releases-author-id-github-import
- Project id 22 was imported with this MR fix and we can observe the releases is imported with author_id.
- Project id 23 was imported with current master as source and we can observe the releases are imported without author_id.
How to set up and validate locally
-
Feature.enable(:import_release_authors_from_github)
-
Import a project with releases from Github using the Gitlab API.
curl --request POST \
--url "http://localhost:3000/api/v4/import/github" \
--header "content-type: application/json" \
--header "PRIVATE-TOKEN: <gitlab-token>" \
--data '{
"personal_access_token": "<github-token>",
"repo_id": "12116599",
"target_namespace": "root",
"new_name": "test-github-import"
}'
Import a project with Releases from Github and we can observe the releases records in Gitlab is created with a author_id
.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #343448 (closed)