Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: ensure changelog news fragment author usage #1317

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
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`)
Loading