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
471703aa
Commit
471703aa
authored
Nov 26, 2020
by
Marcel Amirault
Committed by
Rémy Coutable
Nov 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test all files if docs-lint config changes
If vale or markdownlint are updated, we should run on all files.
parent
28438e30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
doc/.vale/gitlab/Acronyms.yml
doc/.vale/gitlab/Acronyms.yml
+2
-0
scripts/lint-doc.sh
scripts/lint-doc.sh
+9
-3
No files found.
doc/.vale/gitlab/Acronyms.yml
View file @
471703aa
...
...
@@ -22,11 +22,13 @@ exceptions:
-
AWS
-
BSD
-
CLI
-
CNA
-
CNAME
-
CORE
-
CPU
-
CSS
-
CSV
-
CVE
-
DAG
-
DAST
-
DHCP
...
...
scripts/lint-doc.sh
View file @
471703aa
...
...
@@ -65,10 +65,16 @@ then
echo
"Merge request pipeline (detached) detected. Testing all files."
else
MERGE_BASE
=
$(
git merge-base
${
CI_MERGE_REQUEST_TARGET_BRANCH_SHA
}
${
CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
}
)
MD_DOC_PATH
=
$(
git diff
--name-only
"
${
MERGE_BASE
}
..
${
CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
}
"
'doc/*.md'
)
if
[
-n
"
${
MD_DOC_PATH
}
"
]
if
git diff
--name-only
"
${
MERGE_BASE
}
..
${
CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
}
"
|
grep
-E
"
\.
vale|
\.
markdownlint|lint-doc
\.
sh"
then
echo
-e
"Merged results pipeline detected. Testing only the following files:
\n
${
MD_DOC_PATH
}
"
MD_DOC_PATH
=
${
MD_DOC_PATH
:-
doc
}
echo
"Vale, Markdownlint, or lint-doc.sh configuration changed. Testing all files."
else
MD_DOC_PATH
=
$(
git diff
--name-only
"
${
MERGE_BASE
}
..
${
CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
}
"
'doc/*.md'
)
if
[
-n
"
${
MD_DOC_PATH
}
"
]
then
echo
-e
"Merged results pipeline detected. Testing only the following files:
\n
${
MD_DOC_PATH
}
"
fi
fi
fi
...
...
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