1. 07 Mar, 2022 29 commits
  2. 06 Mar, 2022 8 commits
  3. 05 Mar, 2022 3 commits
    • David O'Regan's avatar
      Merge branch '344104-remove-obsolete-haml' into 'master' · 9a3476f2
      David O'Regan authored
      Removed obsolete HAML
      
      See merge request gitlab-org/gitlab!80628
      9a3476f2
    • Paul Gascou-Vaillancourt's avatar
      Removed obsolete HAML views · 17e634ac
      Paul Gascou-Vaillancourt authored
      This removes some obsolete HAML:
      
      * In app/views/ci/variables/_variable_row.html.haml, some code was
        guarded by a condition that always evaluates to false and has thus
        been removed.
      * The app/views/shared/buttons/_project_feature_toggle.html.haml view
        has been deleted as it's not used anywhere anymore. From now on, we
        should use the Pajamas-complient _gl_toggle.html.haml view.
      17e634ac
    • Kassio Borges's avatar
      Add `/projects/remote-import-s3` API endpoint to import from AWS S3 · 920812c9
      Kassio Borges authored
      Related to: https://gitlab.com/gitlab-org/gitlab/-/issues/348874
      
      Instead of using inheritance to share code among the project creation
      classes, I refactor it to use composition. This away the code is a bit
      more extensible and has more independent parts (less coupling).
      
      `Import::GitlabProjects::CreateProjectFromRemoteFileService` and
      `Import::GitlabProjects::CreateProjectFromUploadedFileService` was
      replaced by a single entry point
      `Import::GitlabProjects::CreateProjectService`.
      
      `Import::GitlabProjects::CreateProjectService` is responsible to create
      a project when the user parameters are valid. Since the user can use
      different strategies to create/import a project, the requirements for
      each strategy is implemented in different
      `Import::GitlabProjects::Strategies::*` classes, this way the strategy
      can be changed by dependency injection.
      
      A `Import::GitlabProjects::Strategies::*` class must implement:
      - initialize(current_user:, params:)
      - valid? - validate the user parameters
      - errors - when invalid, a ActiveModel::Errors object
      - project_params - A hash with the specific strategy extra parameters to
        create the project
      
      Also, because importing from a generic object storage and from AWS S3
      have similar validations to be performed, the
      `Import::GitlabProjects::Strategies::RemoteFileValidator` was created to
      validate the remote file `content_length` and `content_type`.
      
      MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77259
      920812c9