Contributing
Thank you for contributing to changelog-action! This document outlines guidelines and workflows for testing and contributing to this GitHub Action.
Local Development & Testing Workflowβ
The action core (changelog.py) is written in Python 3. Unit tests are located in test_changelog.py and cover SBOM package parsing, package diffing, commit extraction, tag discovery, and markdown/JSON rendering.
Running Unit Testsβ
Unit tests use pytest with network and CLI seams monkeypatched (no live container registry requests or external binary executions required).
Before running the tests, install these prerequisites:
- Python 3 with the
venvmodule - Network access to PyPI to install
pytest
From the repository root, create an isolated environment, install pytest,
and run the test suite:
python3 -m venv .venv
.venv/bin/python -m pip install pytest
.venv/bin/python -m pytest
Local Testing of changelog.py CLIβ
You can directly run changelog.py locally to verify CLI options and output formatting:
python3 changelog.py --help
For verbose output during testing:
python3 changelog.py --verbose --help
Pull Request Guidelinesβ
- Ensure all unit tests pass prior to submitting your PR:
.venv/bin/python -m pytest
- Follow Conventional Commits format for commit messages (e.g.
docs: ...,fix: ...,feat: ...). - Always sign your commits using DCO (
git commit -s).