Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Don't add component_name if we didn't found one. #1408

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ansibullbot/triagers/plugins/component_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ def get_component_match_facts(iw, component_matcher, valid_labels):
_filenames.append(m.group(1))
_filenames = sorted(set(_filenames))
expected = sorted(set([x[u'repo_filename'] for x in CM_MATCHES]))
if _filenames != expected:
# https://github.com/ansible/ansibullbot/issues/1301
if expected and _filenames != expected:
cmeta[u'needs_component_message'] = True

return cmeta
Expand Down
4 changes: 2 additions & 2 deletions templates/components_banner.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Files identified in the description:
{% if meta['component_matches'] %}
Files identified in the description:
{% for x in meta['component_matches'] %}
{% if x['is_collection'] or x['repo_filename'].startswith('collection:') %}
* {{ '[`' + x['repo_filename']|string + '`](' + x['collection_scm']|string + ')'}}
Expand All @@ -8,7 +8,7 @@ Files identified in the description:
{% endif %}
{% endfor %}
{% else %}
None
No files were identified in the description
{% endif %}

If these files are incorrect, please update the `component name` section of the description or use the `!component` bot command.
Expand Down