Skip to content
Snippets Groups Projects
Verified Commit 570dd6a9 authored by Matthew Wang's avatar Matthew Wang
Browse files

Adds heuristic CI test to prevent merges that remove lines

parent e5604d3e
No related branches found
No related tags found
No related merge requests found
Pipeline #576011 passed with stages
in 1 minute and 47 seconds
......@@ -6,6 +6,9 @@ test:
script:
- javac *.java
- java GenerateSite
# heuristic to see if any lines were removed!
- git fetch origin main
- '(exit $(git diff origin/main HEAD | grep "^-[^-]" | wc -l)) || { echo "Malformed merge request: at least one line is removed in diff." && (exit 1) }'
pages:
tags:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment