Merge pull request #8 from xoxys/fix-meta-deps

add better handling of meta dependencies in templates
This commit is contained in:
Robert Kaussow 2020-03-08 17:04:50 +01:00 committed by GitHub
commit 1cddb441a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 73 additions and 6 deletions

62
.github/settings.yml vendored Normal file
View File

@ -0,0 +1,62 @@
---
repository:
name: ansible-doctor
description: Simple annotation based documentation for your roles
homepage: https://ansible-doctor.geekdocs.de
topics: ansible, documentation, automation, python
private: false
has_issues: true
has_projects: false
has_wiki: false
has_downloads: false
default_branch: master
allow_squash_merge: true
allow_merge_commit: true
allow_rebase_merge: true
labels:
- name: bug
color: d73a4a
description: Something isn't working
- name: documentation
color: 0075ca
description: Improvements or additions to documentation
- name: duplicate
color: cfd3d7
description: This issue or pull request already exists
- name: enhancement
color: a2eeef
description: New feature or request
- name: good first issue
color: 7057ff
description: Good for newcomers
- name: help wanted
color: 008672
description: Extra attention is needed
- name: invalid
color: e4e669
description: This doesn't seem right
- name: question
color: d876e3
description: Further information is requested
- name: wontfix
color: ffffff
description: This will not be worked on
branches:
- name: master
protection:
required_pull_request_reviews: null
required_status_checks:
strict: true
contexts:
- continuous-integration/drone/pr
enforce_admins: false
restrictions:
users: []
teams: []
...

View File

@ -1,2 +1,3 @@
* BUGFIX
* remove only first hashtag from a multiline comment
* add better handling of meta dependencies in templates

View File

@ -3,9 +3,11 @@
## Dependencies
{% if meta | deep_get(meta, "dependencies.value") %}
{% for item in meta.dependencies.value %}
* {{ item }}
{% endfor %}
{% if meta.dependencies.value is mapping %}
{{ meta.dependencies.value.dependencies | to_nice_yaml(indent=0) }}
{% else %}
{{ meta.dependencies.value | to_nice_yaml(indent=0) }}
{% endif %}
{% else %}
None.
{% endif %}

View File

@ -3,9 +3,11 @@
## Dependencies
{% if meta | deep_get(meta, "dependencies.value") %}
{% for item in meta.dependencies.value %}
* {{ item }}
{% endfor %}
{% if meta.dependencies.value is mapping %}
{{ meta.dependencies.value.dependencies | to_nice_yaml(indent=0) }}
{% else %}
{{ meta.dependencies.value | to_nice_yaml(indent=0) }}
{% endif %}
{% else %}
None.
{% endif %}