Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
faang
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
18
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CSE 391
24wi
faang
Commits
570dd6a9
Verified
Commit
570dd6a9
authored
1 year ago
by
Matthew Wang
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+3
-0
3 additions, 0 deletions
.gitlab-ci.yml
with
3 additions
and
0 deletions
.gitlab-ci.yml
+
3
−
0
View file @
570dd6a9
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment