Improve ansible-test classifications for collections (#72353)

pull/72446/head
Felix Fontein 4 years ago committed by GitHub
parent 6543c7bc5d
commit 64a809d2b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- "ansible-test - improve classification of changes to ``.gitignore``, ``COPYING``, ``LICENSE``, ``Makefile``, and all files ending with one of ``.in`, ``.md`, ``.rst``, ``.toml``, ``.txt`` in the collection root directory (https://github.com/ansible/ansible/pull/72353)."

@ -660,6 +660,9 @@ class PathMapper:
if result is not None:
return result
filename = os.path.basename(path)
dummy, ext = os.path.splitext(filename)
minimal = {}
if path.startswith('changelogs/'):
@ -668,6 +671,24 @@ class PathMapper:
if path.startswith('docs/'):
return minimal
if '/' not in path:
if path in (
'.gitignore',
'COPYING',
'LICENSE',
'Makefile',
):
return minimal
if ext in (
'.in',
'.md',
'.rst',
'.toml',
'.txt',
):
return minimal
return None
def _classify_ansible(self, path): # type: (str) -> t.Optional[t.Dict[str, str]]

Loading…
Cancel
Save