# Improve guided tour detection to use structural check \(\#51969\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/278e81b7db6e66438b2decee4126cb6542516b5b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 278e81b7db6e66438b2decee4126cb6542516b5b

Requested commit: 278e81b7db6e66438b2decee4126cb6542516b5b

Commit: 278e81b7db6e66438b2decee4126cb6542516b5b

Tree: ee07541becc24e90f933e5a003a8972174de34e0

Author: John D\. Swanson

Committer: GitHub

## Message

```
Improve guided tour detection to use structural check (#51969)

## Context

Follow-up to #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 #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
```

## Parents

- [b78687263dad5ea92efef9d400c4626d73d4c2be](https://git.cafe/gitcafe/zed/commit/b78687263dad5ea92efef9d400c4626d73d4c2be?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/278e81b7db6e66438b2decee4126cb6542516b5b?format=markdown)
