feat: add strategy for R packages #2436
Open
+299
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2151 🦕
I'm new to typescript and javascript, so please take this as a work in progress.
One thing that I couldn't figure out how to handle was how to create a NEWS.md file by default, without explicitly having to specify
--changelog-path=NEWS.md
. It would be nice if this could be a per-strategy default, but maybe I'm missing something obvious and otherwise I guess that should go into its own issue.Another issue is that typically R packages have a NEWS.md file with a somewhat different structure, and it doesn't expect a top-level header but instead a package version (typically including name, but I don't think that's necessary). Otherwise some of the tools used in the R community, such as pkgdown have a hard time dealing with the changelogs. A typical NEWS.md file could look like this:
It was straightforward to remove the Changelog header from the generation. Maybe the header levels should be decremented now, but I'm not sure it matters.