-
Notifications
You must be signed in to change notification settings - Fork 25
Add options to specify header level and version prefix #336
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
base: main
Are you sure you want to change the base?
Conversation
86eccbb to
5a7f430
Compare
2e8ff29 to
8ffac52
Compare
|
@RaumZeit Could you please add your changes to the changelog file? Other than that, LGTM. |
1f77a7f to
1c228ea
Compare
|
Need some more time to fix the |
1c228ea to
b0de1ff
Compare
Seems good now! |
|
In my opinion, For example, you could get your prefix and h3 behavior by configuring this: uses: ffurrer2/extract-release-notes@v2
header_regex: '### \[Version \d+\.\d+\.\d+\]'And I could match my format with: uses: ffurrer2/extract-release-notes@v2
header_regex: '## \d+\.\d+\.\d+'This would also make |
Hey, On the other hand, for situations where the version is not surrounded by brackets, I'd rather relax the internal regex. Then, keeping just the prefix would suffice, since any suffixes are ignored anyway... The required changes have just been pushed to my branch here... |
|
If you need to parse header level separately, you can still support a custom regex if it just matches the header title (i.e. what your uses: ffurrer2/extract-release-notes@v2
version_regex: '\[Version \d+\.\d+\.\d+\]'
unreleased_regex: '\[Unreleased\]
header_level: 3I'm not sure what code injections dangers you're referring to; people are running this on their own code, and it's just a regex so the worst case scenario is that it matches the wrong line. Escaping the prefix makes sense since it's a plaintext string, but a custom regex wouldn't need any escaping. I'm glad you relaxed the bracket requirements since it fixes my case, but if someone has a format like e.g. |
6423870 to
7d8d14a
Compare
- Also fix indentation errors in action.yml
7d8d14a to
dbe4161
Compare
3cc3578 to
75660a3
Compare
Hi,
in our project, the
CHANGELOG.mdfile deviates a little from what is expected by the current github actions script. In particular, the header level of the version specific changelog entries isH3instead ofH2. In addition, the header not only states the version number (x.y.z), but contains a prefix string, such that each line looks like:[Version x.y.z]
instead of just
[x.y.z]
To account for these deviations, I've modified your script to allow for additional, optional arguments:
header_levelinputversion_prefixinputI thought, it might be useful for others, so I want to share. The additional inputs are documented and examples are given in
README.mdas well.It would be nice, if it would be integrated into your mainstream release.
Cheers,
RaumZeit