Skip to content

Commit

Permalink
ci: ensure changelog news fragment author usage
Browse files Browse the repository at this point in the history
  • Loading branch information
bjlittle committed Feb 2, 2025
1 parent 866b30f commit 8307900
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/scripts/changelog.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env python3
# Copyright (c) 2021, GeoVista Contributors.
#
# This file is part of GeoVista and is distributed under the 3-Clause BSD license.
# See the LICENSE file in the package root directory for licensing details.

"""Perform quality assurance of pull-request changelog.
"""Perform quality assurance of pull-request changelog news fragments.
Notes
-----
Expand Down Expand Up @@ -239,7 +240,9 @@ def main(pr: str, changelog: str, verbose: bool) -> None:
# sanitise the csv news fragment file names
fragments = changelog.split(",")
fragments = [
str(Path(fragment.strip()).relative_to(base)) for fragment in fragments
str(Path(fragment.strip()).relative_to(base))
for fragment in fragments
if fragment
]
debug(f"{fragments=}", verbose=verbose)

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ jobs:
env:
CHANGELOG: "${{ steps.changes.outputs.changelog_files }}"
PR: "${{ github.event.number }}"
SCRIPTS: "./.github/scripts"
working-directory: .github/scripts
run: |
python -m pip install click towncrier
python -c "import sys; print(f'version = {sys.version}')"
towncrier --version
python ${SCRIPTS}/changelog.py "${PR}" "${CHANGELOG}"
./changelog.py --verbose "${PR}" "${CHANGELOG}"
3 changes: 3 additions & 0 deletions changelog/1317.contributor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
There is no author mentioned here.
And there should be.
(`bjlittle`)

0 comments on commit 8307900

Please sign in to comment.