lib/release_tools/security/issue_crawler.rb
# Returns all the upcoming security release issues, sorted by their due
# dates.
Returns all the upcoming security release issues, sorted by their due
dates.
Returns all the upcoming security release issues sorted by their due dates .
def security_release_issues
        issues = GitlabClient
          .issues(PUBLIC_PROJECT, labels: ROOT_ISSUE_LABEL, state: OPENED)
          .auto_paginate
        issues.each do |issue|
          next if issue.due_date
          raise "The issue #{issue.web_url} does not have a due date set"
        end
        issues.sort do |a, b|
          Date.strptime(a.due_date, DUE_DATE_FORMAT) <=>
            Date.strptime(b.due_date, DUE_DATE_FORMAT)
        end
      end
def security_release_issues issues = GitlabClient . issues ( PUBLIC_PROJECT , labels : ROOT_ISSUE_LABEL , state : OPENED ) . auto_paginate issues . each do | issue | next if issue . due_date raise "The issue #{issue.web_url} does not have a due date set" end issues . sort do | a , b | Date . strptime ( a . due_date , DUE_DATE_FORMAT ) <=> Date . strptime ( b . due_date , DUE_DATE_FORMAT ) end end
Returns all the upcoming security release issues, sorted by their due
dates.
Returns all the upcoming security release issues sorted by their due dates .
# Ignoring issues without a due date could lead to security releases # being overlooked, so instead we error if we find an issue without a # due date.