-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Components: relax link pattern matching in CHANGELOG CI check #50248
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍 I didn't really do the full test creating a new PR, but the diff is sufficiently trivial 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Chad! 🚀
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