Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4a766dd3
Commit
4a766dd3
authored
Feb 09, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore deleted files in docs linting
Otherwise our script will fail if a file gets deleted.
parent
86a5baf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
scripts/lint-doc.sh
scripts/lint-doc.sh
+2
-2
No files found.
scripts/lint-doc.sh
View file @
4a766dd3
...
@@ -92,12 +92,12 @@ then
...
@@ -92,12 +92,12 @@ then
echo
"Merge request pipeline (detached) detected. Testing all files."
echo
"Merge request pipeline (detached) detected. Testing all files."
else
else
MERGE_BASE
=
$(
git merge-base
${
CI_MERGE_REQUEST_TARGET_BRANCH_SHA
}
${
CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
}
)
MERGE_BASE
=
$(
git merge-base
${
CI_MERGE_REQUEST_TARGET_BRANCH_SHA
}
${
CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
}
)
if
git diff
--name-only
"
${
MERGE_BASE
}
..
${
CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
}
"
|
grep
-E
"
\.
vale|
\.
markdownlint|lint-doc
\.
sh"
if
git diff
--
diff-filter
=
d
--
name-only
"
${
MERGE_BASE
}
..
${
CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
}
"
|
grep
-E
"
\.
vale|
\.
markdownlint|lint-doc
\.
sh"
then
then
MD_DOC_PATH
=
${
MD_DOC_PATH
:-
doc
}
MD_DOC_PATH
=
${
MD_DOC_PATH
:-
doc
}
echo
"Vale, Markdownlint, or lint-doc.sh configuration changed. Testing all files."
echo
"Vale, Markdownlint, or lint-doc.sh configuration changed. Testing all files."
else
else
MD_DOC_PATH
=
$(
git diff
--
name-only
"
${
MERGE_BASE
}
..
${
CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
}
"
'doc/*.md'
)
MD_DOC_PATH
=
$(
git diff
--
diff-filter
=
d
--name-only
"
${
MERGE_BASE
}
..
${
CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
}
"
--
'doc/*.md'
)
if
[
-n
"
${
MD_DOC_PATH
}
"
]
if
[
-n
"
${
MD_DOC_PATH
}
"
]
then
then
echo
-e
"Merged results pipeline detected. Testing only the following files:
\n
${
MD_DOC_PATH
}
"
echo
-e
"Merged results pipeline detected. Testing only the following files:
\n
${
MD_DOC_PATH
}
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment