Semantic Pull Requests
Relevant source files
The following files were used as context for generating this wiki page:
Semantic Pull Requests is a convention-based workflow used in the cron-ext project to ensure that pull request titles follow the Conventional Commits specification. This system is managed through the semantic-prs GitHub application, which validates PR titles to streamline the generation of changelogs and the management of release notes.
Sources: CONTRIBUTING.md:14-16
Integration and Workflow
The project integrates the semantic-prs app to enforce a structured naming convention for all incoming contributions. When a contributor opens or updates a pull request, the system checks the title against a specific regex-based syntax. This ensures that every change is categorized appropriately (e.g., as a new feature, a bug fix, or documentation update) before it is merged into the codebase.
Sources: CONTRIBUTING.md:14-18
PR Title Format
The general format required for a pull request title is <type>: <description>. While conventional commit syntax is strongly encouraged for individual commit messages within the branch, it is strictly required for the PR title itself.
Sources: CONTRIBUTING.md:18-20
Supported Types
The following table outlines the permitted types used in the Semantic PR workflow:
| Type | Description |
|---|---|
feat | A new feature for the user, not a new feature for builds |
fix | A bug fix for the user, not a fix to a build script |
docs | Changes to the documentation |
style | Formatting, missing semi colons, etc; no production code change |
refactor | Refactoring production code, e.g. renaming a variable |
perf | Code changes that improve performance |
test | Adding missing tests, refactoring tests; no production code change |
build | Changes that affect the build system or external dependencies |
ci | Changes to CI configuration files and scripts |
chore | Other changes that don't modify src or test files |
revert | Reverts a previous commit |
Sources: CONTRIBUTING.md:22-32
Validation Flow
The validation process occurs automatically via GitHub webhooks linked to the semantic-prs application. The following diagram illustrates how a PR title is processed within the project's development lifecycle.
The validation logic ensures that the cron-ext utility maintained at cron_ext/ remains consistent with automated release tooling.
Sources: CONTRIBUTING.md:14-20, pyproject.toml:1-5
Advanced Configuration
More advanced rules for semantic validation, including specific scopes or additional types, are defined within the .github/semantic.yml configuration file. This file allows the project to fine-tune how the GitHub app interprets titles and which specific behaviors are enforced during the check.
Sources: CONTRIBUTING.md:34-35
Relationship to Code Quality
Semantic PRs work in tandem with other quality control tools used in the project, such as pre-commit, Black for formatting, and mypy for type hinting. While the semantic check focuses on the metadata of the change (the title), these other tools focus on the content of the cron_ext/ source files.
Sources: CONTRIBUTING.md:37-67, pyproject.toml:28-50
Conclusion
By enforcing Semantic Pull Requests, the cron-ext project maintains a high standard of repository health. This practice facilitates clear communication among contributors and enables automated tools to parse the project history for significant changes, ensuring that users of the Meltano utility extension are well-informed of new features and fixes.
Sources: CONTRIBUTING.md:14-16, pyproject.toml:6-7