lib/release_tools/security/merge_request_validator.rb
def validate_closing_security_issue
        return unless @merge_request.target_branch == 'master'

        issue_to_be_closed = @client
          .merge_request_closes_issues(@merge_request.project_id, @merge_request.iid)
          .detect { |issue| issue.web_url.match?(SECURITY_NAMESPACE) }

        return unless issue_to_be_closed.nil?

        error('The merge request must close the security implementation issue', <<~ERROR)
          This merge request is targeting master and it should close the security implementation
          issue when merged. Please add `Closes #<Security issue IID>` to the merge request
          description.
        ERROR
      end
# Validates if a merge request will automatically close the security
# implementation issue when merged.
#
# Closing issues automatically only works if the merge request targets
# the default project's branch, so we return early unless the merge request
# targets master
Validates if a merge request will automatically close the security
implementation issue when merged.

Closing issues automatically only works if the merge request targets
the default project's branch, so we return early unless the merge request
targets master
Validates if a merge request will automatically close the security implementation issue when merged . Closing issues automatically only works if the merge request targets the default project ' s branch so we return early unless the merge request targets master
def validate_closing_security_issue
        return unless @merge_request.target_branch == 'master'
        issue_to_be_closed = @client
          .merge_request_closes_issues(@merge_request.project_id, @merge_request.iid)
          .detect { |issue| issue.web_url.match?(SECURITY_NAMESPACE) }
        return unless issue_to_be_closed.nil?
        error('The merge request must close the security implementation issue', <<~ERROR)
          This merge request is targeting master and it should close the security implementation
          issue when merged. Please add `Closes #<Security issue IID>` to the merge request
          description.
        ERROR
      end
def validate_closing_security_issue return unless @merge_request . target_branch == 'master' issue_to_be_closed = @client . merge_request_closes_issues ( @merge_request . project_id , @merge_request . iid ) . detect { | issue | issue . web_url . match? ( SECURITY_NAMESPACE ) } return unless issue_to_be_closed . nil? error ( 'The merge request must close the security implementation issue' , <<~ERROR ) 
          This merge request is targeting master and it should close the security implementation
          issue when merged. Please add `Closes #<Security issue IID>` to the merge request
          description.
         ERROR end
Validates if a merge request will automatically close the security
implementation issue when merged.
Validates if a merge request will automatically close the security implementation issue when merged .