Skip to content

Add Security Implementation issue class

Mayra Cabrera requested to merge add-security-implementation-issue into master

What does this MR do?

Introduces a new class to represent a security implementation issue. At the moment, it only contains two methods:

  • merge_requests_ready? - Returns true or false depending if the merge requests of the issue are ready to be processed. They are considered 'ready' if they are four and all of them are assigned to GitLab Release Bot
  • merge_request_master - Returns the merge request targeting master

This class will be used on MergeRequestsBatchMerger as follow:

class MergeRequestsBatchMerger
  def execute
    issues = fetch_security_implementation_issues

    issues.each do |issue|
      next unless issue.merge_requests_ready?

      # Continue processing the issues
    end
  end
  
  private

  # This one returns Security::ImplementationIssue instances
  def fetch_security_implementation_issues
    Security::IssueCrawler
      .new
      .upcoming_security_issues_and_merge_requests
  end
end

You can see the full implementation !927 (merged)

As part of https://gitlab.com/gitlab-org/release-tools/-/issues/369

Edited by Mayra Cabrera

Merge request reports