summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorRick Elrod <rick@elrod.me>2020-07-23 19:26:15 -0500
committerGitHub <noreply@github.com>2020-07-23 19:26:15 -0500
commit53a1885ab55d78316ce83cc21190009055ad3c9a (patch)
tree73b291fa9faa9342b806318526ff1120aed9ac47 /packaging
parent4d675b6d876219780f234360b02ddee1ef3a0df1 (diff)
downloadansible-53a1885ab55d78316ce83cc21190009055ad3c9a.tar.gz
Make changelog tool be more strict about suffixes (#70798)
* Make changelog tool be more strict about suffixes Change: - Files must end in .yml or .yaml, and must not be dotfiles. - This is to prevent (for example) emacs backup files (.yml~) from being included in changelogs during releases. - Backport of https://github.com/ansible-community/antsibull-changelog/pull/33 Signed-off-by: Rick Elrod <rick@elrod.me>
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/release/changelogs/changelog.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/packaging/release/changelogs/changelog.py b/packaging/release/changelogs/changelog.py
index ab09bef716..3876100683 100755
--- a/packaging/release/changelogs/changelog.py
+++ b/packaging/release/changelogs/changelog.py
@@ -211,6 +211,9 @@ def load_fragments(paths=None, exceptions=None):
fragments = []
for path in paths:
+ bn_path = os.path.basename(path)
+ if bn_path.startswith('.') or not bn_path.endswith(('.yml', '.yaml')):
+ continue
try:
fragments.append(ChangelogFragment.load(path))
except Exception as ex: