Skip to content

Add import CSV endpoint for Requirements

What does this MR do?

Related to #284138 (closed)

As an additional iteration for !46361 (merged) and !46429 (merged), this MR adds a controller endpoint that allows the upload of a CSV file that will be imported as Requirements.

Following Uploads development documentation a new authorize endpoint is included and tested using WorkhorseHelpers.

As the logic for authorizing the new endpoint already existed in the WorkhorseImportExportUpload concern, it's refactored in this MR to make it reusable for Import::GitlabGroupsController, Import::GitlabProjectsController and Projects::RequirementsManagement::RequirementsController.

No UI changes are introduced in this MR but they will be implemented as part of the frontend work for #246857 (closed)

Tasks

Order of tasks

Alessio Caiazza @nolith commented:

Yes. If you are sure about the URL of your new endpoint I'll suggest you open a merge request on workhorse first, so that it can be merged and released. Then we can bump workhorse version with a simple MR like !46666 (merged) and have it merged before this one.

Feature Flag

These changes are behind the FF import_requirements_csv.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #284138 (closed)

Edited by Eugenia Grieff

Merge request reports

Loading