Commit c2d3cabd authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Adding more details to the conflict log file

parent 0d4a9574
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -86,6 +86,14 @@ echo "${merge_requests}" | jq -c '.[]' | while read mr; do
    result=$?
    result=$?
    if [ ! $result == 0 ] ; then
    if [ ! $result == 0 ] ; then
      echo "Merge request title: ${mr_title}, Merge Request ID: ${mr_id}" >> conflicting_merge_requests.txt
      echo "Merge request title: ${mr_title}, Merge Request ID: ${mr_id}" >> conflicting_merge_requests.txt
      spec=$(git diff --name-only --diff-filter=U | grep -E "(TS|TR)")
      sed -n '
        /^<<<<<<< /,/^>>>>>>> / {
          /^<<<<<<<\|^>>>>>>>/!{=;p}
          /^>>>>>>> /a\

        }
      ' ${spec} >> conflicting_merge_requests.txt
      conflicting_merge_request_ids+=("${mr_id}")
      conflicting_merge_request_ids+=("${mr_id}")
      # Setting label to the merge request which is conflicting with
      # Setting label to the merge request which is conflicting with
      echo "Setting label to the merge request which is conflicting with: ${mr_id}"
      echo "Setting label to the merge request which is conflicting with: ${mr_id}"