lib/release_tools/security/issue_crawler.rb
# Returns all security issues and merge requests for the given root
# security issue.
#
# The `release_issue_iid` is the IID of the (confidential) security issue
# opened in the gitlab-org/gitlab project.
Returns all security issues and merge requests for the given root
security issue.

The `release_issue_iid` is the IID of the (confidential) security issue
opened in the gitlab-org/gitlab project.
Returns all security issues and merge requests for the given root security issue . The ` release_issue_iid ` is the IID of the ( confidential ) security issue opened in the gitlab - org / gitlab project .
def security_issues_and_merge_requests_for(release_issue_iid)
        related_issues = []
        GitlabClient
          .client
          .issue_links(PUBLIC_PROJECT, release_issue_iid)
          .auto_paginate do |issue|
            next unless issue.labels.include?(SECURITY_LABEL)
            next unless issue.web_url.include?(SECURITY_NAMESPACE)
            related_issues << issue
          end
        Parallel.map(related_issues, in_threads: Etc.nprocessors) do |issue|
          mrs = []
          GitlabClient
            .related_merge_requests(issue.project_id, issue.iid)
            .auto_paginate do |mr|
              next unless mr.labels.include?(SECURITY_LABEL)
              next unless mr.web_url.include?(SECURITY_NAMESPACE)
              next unless mr.state == OPENED
              mrs << mr
            end
          ReleaseTools::Security::ImplementationIssue.new(issue.project_id, issue.iid, mrs, issue.web_url)
        end
      end
def security_issues_and_merge_requests_for ( release_issue_iid ) related_issues = [ ] GitlabClient . client . issue_links ( PUBLIC_PROJECT , release_issue_iid ) . auto_paginate do | issue | next unless issue . labels . include? ( SECURITY_LABEL ) next unless issue . web_url . include? ( SECURITY_NAMESPACE ) related_issues << issue end Parallel . map ( related_issues , in_threads : Etc . nprocessors ) do | issue | mrs = [ ] GitlabClient . related_merge_requests ( issue . project_id , issue . iid ) . auto_paginate do | mr | next unless mr . labels . include? ( SECURITY_LABEL ) next unless mr . web_url . include? ( SECURITY_NAMESPACE ) next unless mr . state == OPENED mrs << mr end ReleaseTools :: Security :: ImplementationIssue . new ( issue . project_id , issue . iid , mrs , issue . web_url ) end end
Returns all security issues and merge requests for the given root
security issue.
Returns all security issues and merge requests for the given root security issue .
# The list of related issues may contain issues unrelated to # security merge requests. Since the issue links API does not have # any filtering capabilities, we must filter our unrelated issues # manually.
release_issue_iid