airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Adding new precommit to avoid faulty changelog format

Open amoghrajesh opened this issue 1 year ago • 0 comments

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.

amoghrajesh avatar May 03 '24 04:05 amoghrajesh