Skip to content

Adding new precommit to avoid faulty changelog format#39388

Merged
Taragolis merged 3 commits intoapache:mainfrom
amoghrajesh:addingCheckCHANGELOG
May 4, 2024
Merged

Adding new precommit to avoid faulty changelog format#39388
Taragolis merged 3 commits intoapache:mainfrom
amoghrajesh:addingCheckCHANGELOG

Conversation

@amoghrajesh
Copy link
Contributor

Adding a new precommit hook to check for formatting for faulty changelog files. To avoid issues such as #39347 which broke many breeze scripts.

Output example after introducing bug like in #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.

Copy link
Contributor

@eladkal eladkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very helpful!

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
@amoghrajesh amoghrajesh requested a review from Taragolis May 3, 2024 09:14
@amoghrajesh
Copy link
Contributor Author

@uranusjr refactored some part slightly. Are you OK with it?

@amoghrajesh
Copy link
Contributor Author

@Taragolis if it looks good, can we send this one in.

@Taragolis Taragolis merged commit 378fd6f into apache:main May 4, 2024
@utkarsharma2 utkarsharma2 added the type:misc/internal Changelog: Misc changes that should appear in change log label Jun 3, 2024
@utkarsharma2 utkarsharma2 added this to the Airflow 2.10.0 milestone Jun 4, 2024
@ephraimbuddy ephraimbuddy added changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) and removed type:misc/internal Changelog: Misc changes that should appear in change log labels Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants