Skip to content

[388869] GitHub import: fix merge requests creation

What does this MR do and why?

It's a fix (kind of hotfix) for Importing CI/CD projects via GitHub Import not working properly. It's not totally clear what is the purpose for the client to use CI/CD import as he used but it worked for him until we added Run model validations when importing from GitHub. After adding validation it started to fail with "Target project has disabled merge requests" what seems to be right as CI/CD project should have disabled MRs and Issues. This merge request will bring successful import for the client back. On the next week our PM will have a call with client to understand what do we need to do next.

Note: Yes, issues should fail also but they don't. It seems like on the model level we have such validation only for MRs. It's not a scope of this MR.

Screenshots or screen recordings

Before Screenshot_2023-02-07_at_19.38.47
{"feature_category":"importers","import_type":"github","severity":"ERROR","time":"2023-02-07T17:37:56.747Z","correlation_id":"9c749f24b01d26b4798f6f51a32db0fc","project_id":57,"source":"Gitlab::GithubImport::Importer::PullRequestImporter","message":"importer failed","error.message":"Validation failed: Target project has disabled merge requests"}
{"feature_category":"importers","import_type":"github","severity":"ERROR","time":"2023-02-07T17:37:56.747Z","correlation_id":"36d5816ff899e9d1b3afb1bdde8cb8a9","project_id":57,"source":"Gitlab::GithubImport::Importer::PullRequestImporter","message":"importer failed","error.message":"Validation failed: Target project has disabled merge requests"}
After Screenshot_2023-02-07_at_19.52.21

How to set up and validate locally

  • Go to New Project/Repository > Run CI/CD for external repository > Connect repositories from "GitHub"
  • Import repo with MRs

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Rostyslav Safonov

Merge request reports

Loading