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

patchChangelog task removes user entered text anywhere in the file #95

Closed
bric3 opened this issue Jan 7, 2022 · 2 comments
Closed

patchChangelog task removes user entered text anywhere in the file #95

bric3 opened this issue Jan 7, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@bric3
Copy link

bric3 commented Jan 7, 2022

Suppose you added some lines that are not supposed to be listed, eg an introduction or a summary in defined changelog.md file.

## [Unreleased]


## [0.2.3-eap] - 2021-12-06

This is the very first release to do this thing, proceed with caution. Etc. Etc.
Also the project is stopping support this ...

* item a
* item b

TODO
- [ ] i
- [ ] ii
- [X] iii
- [X] iv

And during the release workflow there is task that patches whatever the user entered for a new release.

- name: Patch Changelog # If it was changed in the Edit Release UI
  run: |
    ./gradlew patchChangelog --release-note "$(cat << 'EOM'
    ${{ github.event.release.body }}
    EOM
    )"

However the task actually removes lines that do not start with the defined prefix (like *).

## [Unreleased]
+ ### What's comming from github
+ 
+ * item 1

## [0.2.3-eap] - 2021-12-06
- 
- This is the very first release to do this thing, proceed with caution. Etc. Etc.
- Also the project is stopping support this ...

* item a
* item b

- TODO
- - [X] i
- - [X] ii
- - [ ] iii
- - [ ] iv
@hsz hsz added the bug Something isn't working label Oct 18, 2022
@hsz hsz added this to the next milestone Oct 18, 2022
@hsz
Copy link
Member

hsz commented Oct 18, 2022

With #127, a summary property was introduced that allows for adding extra content before (only) the changelog items.
In your case, the first part will be kept – TODO will still vanish.

@hsz hsz closed this as completed Oct 18, 2022
@bric3
Copy link
Author

bric3 commented Oct 18, 2022

For reference there's also a another workaround for these cases by configuring itemPrefix.set("").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants