CI: Improve backport-changelog PR regex #68049
Open
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.
What?
The backport-changelog CI script searches for matching markdown files in the backport-changelog directory.
This relies on a regular expression matching some specific markdown syntax, specifically a list item with a given text. There are different ways of writing the same list that are identically in rendered markdown, this PR changes the regex to be more resilient to possible differences in the specific markdown used to obtain the same file result.
Markdown lists are interesting.
Part of #66235, where markdown autoformatting is applied.
Done
-
and-
are both allowed).Not done
+
is also a valid list item mark according to commonmark, but my experience is that it's an unusual choice in practice and I did not add it here. It was not necessary for Autoformat markdown files #66235.Why?
Autoformatting in #66235 changes these markdown files in a consistent way that should have no semantic impact. Update our tooling appropriately.
How?
By adjusting the regex.
Testing Instructions
Try the different regexes on this PR, they should behave the same. If you try them on #66235, this regex should work while the previous one would not.