airflow
airflow copied to clipboard
Adding new precommit to avoid faulty changelog format
Adding a new precommit hook to check for formatting for faulty changelog files. To avoid issues such as https://github.com/apache/airflow/pull/39347 which broke many breeze scripts.
Output example after introducing bug like in https://github.com/apache/airflow/pull/39347
(new-env) ➜ airflow git:(addingCheckCHANGELOG) ✗ git add airflow/providers/atlassian/jira/CHANGELOG.rst
(new-env) ➜ airflow git:(addingCheckCHANGELOG) ✗ pre-commit run check-changelog-format
Check changelog format...................................................Failed
- hook id: check-changelog-format
- exit code: 1
Invalid format in airflow/providers/atlassian/jira/CHANGELOG.rst: version is followed by version
Check for lines with 2.6.0 and 2.5.0
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.