Improve ansible-test classifications for collections (#72353)
(cherry picked from commit 64a809d2b6
)
This commit is contained in:
parent
dbdacbd48c
commit
7e2faa25d7
2 changed files with 23 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue