diff options
author | Rick Elrod <rick@elrod.me> | 2020-07-23 19:26:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 19:26:15 -0500 |
commit | 53a1885ab55d78316ce83cc21190009055ad3c9a (patch) | |
tree | 73b291fa9faa9342b806318526ff1120aed9ac47 /packaging | |
parent | 4d675b6d876219780f234360b02ddee1ef3a0df1 (diff) | |
download | ansible-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-x | packaging/release/changelogs/changelog.py | 3 |
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: |