mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
now supports maintainers and author field for display as MAINTAINERS
This commit is contained in:
parent
c603caca27
commit
5ba9fe4748
1 changed files with 12 additions and 4 deletions
|
@ -285,10 +285,18 @@ class DocCLI(CLI):
|
||||||
text.append(doc['returndocs'])
|
text.append(doc['returndocs'])
|
||||||
text.append('')
|
text.append('')
|
||||||
|
|
||||||
|
maintainers = set()
|
||||||
|
if 'author' in doc:
|
||||||
if isinstance(doc['author'], basestring):
|
if isinstance(doc['author'], basestring):
|
||||||
maintainers = [doc['author']]
|
maintainers.add(doc['author'])
|
||||||
else:
|
else:
|
||||||
maintainers = doc['author']
|
maintainers.update(doc['author'])
|
||||||
|
|
||||||
|
if 'maintainers' in doc:
|
||||||
|
if isinstance(doc['maintainers'], basestring):
|
||||||
|
maintainers.add(doc['author'])
|
||||||
|
else:
|
||||||
|
maintainers.update(doc['author'])
|
||||||
|
|
||||||
text.append('MAINTAINERS: ' + ', '.join(maintainers))
|
text.append('MAINTAINERS: ' + ', '.join(maintainers))
|
||||||
text.append('')
|
text.append('')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue