validate_pipeline_status

in lib/release_tools/security/merge_request_validator.rb [57:81]


      def validate_pipeline_status
        pipeline = Pipeline.latest_for_merge_request(@merge_request, @client)

        if pipeline.nil?
          error('Missing pipeline', <<~ERROR)
            No pipeline could be found for this merge request. Security merge
            requests must have a pipeline that passes before they can be merged.
          ERROR
        elsif pipeline.failed?
          error('Failing pipeline', <<~ERROR)
            The latest pipeline has one or more failing builds. Merge requests
            can not be merged unless the pipeline has passed.
          ERROR
        elsif pipeline.pending? || (pipeline.running? && !default_branch?)
          
          
          
          
          error('Pending pipeline', <<~ERROR)
            The latest pipeline did not pass. Merge requests should not be
            assigned to me until the pipeline is successful.
          ERROR
        end
      end