[markdown] Automatically update include
s in _snippet
files
#220
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.
Builds on #213
Adds logic that will add
include
s to_snippets
files in the correct order if therendered_changelog_destination
in theconfig.changelog.yaml
is usingrelease-notes/_snippets
. This is the case in fleet-server and elastic-agent as of elastic/fleet-server#5374 and elastic/elastic-agent#9440.When using this model, there are multiple levels of nesting to make it as easy as possible to insert new patch version sections in the correct order. For example, when
9.0.8
is released this tool will:index.md
),breaking-changes.md
, anddeprecations.md
snippet files. For example, the 9.0.8 release notes are added to a new snippet file:release-notes/_snippets/9.0.8/index.md
.index
,breaking-changes
, ordeprecations
) for all patch versions of a single minor. For example,release-notes/_snippets/index/9.0.md
. This level of nesting makes it easier to put new patch versions for previous minors in the correct order on the rendered page.release-notes/_snippets/index.md
.release-notes/index.md
) after the intro text.These updates will (1) eliminate any manual steps in the resulting elastic-agent or fleet-server PR outside of copy edits, and (2) reduce the chance of conflicts when forward porting to later minors and
main
(like we ran into in elastic/elastic-agent#10032 and elastic/elastic-agent#10031).Still to do:
cc @karenzone