lib/release_tools/security/merge_requests_batch_merger.rb
def reassign_merge_requests(security_issue)
        logger.info("Merge requests of ##{security_issue.iid} are not valid. Re-assigning them back to the author.")

        mr_master = security_issue.merge_request_targeting_master

        return if SharedStatus.dry_run?

        @client.create_merge_request_discussion(
          mr_master.project_id,
          mr_master.iid,
          body: format(
            ERROR_BATCH_TEMPLATE,
            security_issue_iid: security_issue.iid,
            author_username: mr_master.author.username
          )
        )

        security_issue.merge_requests.each do |merge_request|
          @client.update_merge_request(
            merge_request.project_id,
            merge_request.iid,
            assignee_id: merge_request.author.id
          )
        end
      end
# Re-assigns merge requests back to the author.
#
# Then, notifies the author about the merge requests not
# being valid by adding a discussion on the merge request
# targeting master.
Re-assigns merge requests back to the author.
Then, notifies the author about the merge requests not
being valid by adding a discussion on the merge request
targeting master.
Re - assigns merge requests back to the author . Then notifies the author about the merge requests not being valid by adding a discussion on the merge request targeting master .
def reassign_merge_requests(security_issue)
        logger.info("Merge requests of ##{security_issue.iid} are not valid. Re-assigning them back to the author.")
        mr_master = security_issue.merge_request_targeting_master
        return if SharedStatus.dry_run?
        @client.create_merge_request_discussion(
          mr_master.project_id,
          mr_master.iid,
          body: format(
            ERROR_BATCH_TEMPLATE,
            security_issue_iid: security_issue.iid,
            author_username: mr_master.author.username
          )
        )
        security_issue.merge_requests.each do |merge_request|
          @client.update_merge_request(
            merge_request.project_id,
            merge_request.iid,
            assignee_id: merge_request.author.id
          )
        end
      end
def reassign_merge_requests ( security_issue ) logger . info ( "Merge requests of ##{security_issue.iid} are not valid. Re-assigning them back to the author." ) mr_master = security_issue . merge_request_targeting_master return if SharedStatus . dry_run? @client . create_merge_request_discussion ( mr_master . project_id , mr_master . iid , body : format ( ERROR_BATCH_TEMPLATE , security_issue_iid : security_issue . iid , author_username : mr_master . author . username ) ) security_issue . merge_requests . each do | merge_request | @client . update_merge_request ( merge_request . project_id , merge_request . iid , assignee_id : merge_request . author . id ) end end
Re-assigns merge requests back to the author.
Re - assigns merge requests back to the author .
security_issue