Components: relax link pattern matching in CHANGELOG CI check#50248
Merged
Conversation
|
Size Change: 0 B Total Size: 1.37 MB ℹ️ View Unchanged
|
b9cda05 to
9c0b80c
Compare
|
Flaky tests detected in 9c0b80c. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4862535616
|
jsnajdr
approved these changes
May 3, 2023
jsnajdr
left a comment
Member
There was a problem hiding this comment.
Looks good 👍 I didn't really do the full test creating a new PR, but the diff is sufficiently trivial 🙂
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
Relaxes the pattern matching for Components CHANGELOG entries
Why?
Entries referencing multiple PRs, or other similar cases where the link is present but the entry is formatted slightly differently from the norm currently trigger false failures.
#50133 is a recent example of this, where the check failed because the entry referenced two relevant PRs for a single change.
How?
The problem stems from the pattern looking for the following pattern:
([#${PR_NUMBER}\](https://github\.com/WordPress/gutenberg/pull/${PR_NUMBER})which includes the parentheses around the link to the PR.
This becomes a problem if those parenthesis aren't positioned as expected. In #50133, for example, the relevant PR link was second in the entry, so it matched the closing parenthesis, but the opening parenthesis wasn't where the check expected it to be.
This PR removes those parentheses from the check, making it more flexible. It will now effectively confirm the link is there, and that it's formatted as a proper markdown link, but not enforce any other formatting of the entry.
Testing Instructions