Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actions: add CHANGELOG validation script #13

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

sam-berning
Copy link
Contributor

Issue number:

Closes #

Description of changes:

Adds some rudimentary CHANGELOG validation to the build action that runs on PRs. This should ensure that we don't merge a CHANGELOG that can't be parsed by the release CI.

Testing done:

Tested script locally. Against current CHANGELOG:

$ ./tools/validate-changelog.sh  
CHANGELOG validation PASSED!

Against the CHANGELOG with a "v" removed from a version header:

$ ./tools/validate-changelog.sh
1d0
< 1:# 1.0.2 (2024-12-20)
CHANGELOG validation FAILED! Headers must match the regex '^# v[0-9]\+\.[0-9]\+\.[0-9]\+.'

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@@ -53,4 +53,5 @@ jobs:
- run: make twoliter check-fmt
- run: make twoliter check-clippy
- run: make twoliter check-shell
- run: ./tools/validate-changelog.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

this action will ignore changes made solely to markdown files (L13), so if someone were to make a change that only edits the CHANGELOG, this check wouldn't run

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, good catch, thanks! I'll add a new workflow for validating markdown changes then

@sam-berning sam-berning merged commit 2f50162 into bottlerocket-os:develop Dec 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants