Improve guided tour detection to use structural check#51969
Merged
Conversation
The previous regex still matched the "## How to Review" heading itself. Replace with structural detection: extract the section content, strip HTML comment placeholders, check for actual author-written content. Also soften the confirmation message.
AmaanBilwar
pushed a commit
to AmaanBilwar/zed
that referenced
this pull request
Mar 20, 2026
…#51969) ## Context Follow-up to zed-industries#51964. The previous fix (stripping HTML comments) still had a false positive: the `## How to Review` heading itself matched the `how to review` alternative in the regex. Every PR using the template would trigger the "guided tour detected" message. Replace the regex with structural detection: extract the "How to Review" section, strip template placeholders, and check if the author actually wrote content there. Also softens the confirmation message to "appears to include guidance." ## How to Review - Single file: `.github/workflows/pr-size-check.yml`, lines 147-154 - The `rawBody.match(...)` extracts content between `## How to Review` and the next `##` heading - Confirmed: PR zed-industries#51957's body returns `false`, a PR with actual content returns `true` ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
toshmukhamedov
pushed a commit
to toshmukhamedov/zed
that referenced
this pull request
Mar 20, 2026
…#51969) ## Context Follow-up to zed-industries#51964. The previous fix (stripping HTML comments) still had a false positive: the `## How to Review` heading itself matched the `how to review` alternative in the regex. Every PR using the template would trigger the "guided tour detected" message. Replace the regex with structural detection: extract the "How to Review" section, strip template placeholders, and check if the author actually wrote content there. Also softens the confirmation message to "appears to include guidance." ## How to Review - Single file: `.github/workflows/pr-size-check.yml`, lines 147-154 - The `rawBody.match(...)` extracts content between `## How to Review` and the next `##` heading - Confirmed: PR zed-industries#51957's body returns `false`, a PR with actual content returns `true` ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
AmaanBilwar
pushed a commit
to AmaanBilwar/zed
that referenced
this pull request
Mar 23, 2026
…#51969) ## Context Follow-up to zed-industries#51964. The previous fix (stripping HTML comments) still had a false positive: the `## How to Review` heading itself matched the `how to review` alternative in the regex. Every PR using the template would trigger the "guided tour detected" message. Replace the regex with structural detection: extract the "How to Review" section, strip template placeholders, and check if the author actually wrote content there. Also softens the confirmation message to "appears to include guidance." ## How to Review - Single file: `.github/workflows/pr-size-check.yml`, lines 147-154 - The `rawBody.match(...)` extracts content between `## How to Review` and the next `##` heading - Confirmed: PR zed-industries#51957's body returns `false`, a PR with actual content returns `true` ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
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.
Context
Follow-up to #51964. The previous fix (stripping HTML comments) still had a false positive: the
## How to Reviewheading itself matched thehow to reviewalternative in the regex. Every PR using the template would trigger the "guided tour detected" message.Replace the regex with structural detection: extract the "How to Review" section, strip template placeholders, and check if the author actually wrote content there. Also softens the confirmation message to "appears to include guidance."
How to Review
.github/workflows/pr-size-check.yml, lines 147-154rawBody.match(...)extracts content between## How to Reviewand the next##headingfalse, a PR with actual content returnstrueSelf-Review Checklist
Release Notes: