Skip to content

Allow website doc link to be in the PR description #8257

Merged
ChristopherDedominici merged 8 commits into
mainfrom
script-to-check-pr-link-to-docs
May 8, 2026
Merged

Allow website doc link to be in the PR description #8257
ChristopherDedominici merged 8 commits into
mainfrom
script-to-check-pr-link-to-docs

Conversation

@ChristopherDedominici
Copy link
Copy Markdown
Contributor

@ChristopherDedominici ChristopherDedominici commented May 7, 2026

Currently, the script throws an error if a website docs PR is linked in the description.
I think this can be annoying for reviewers, as it's easier for them to have a direct link to the docs right there.
So, I modified the script to allow linking the website PR in the description, provided the link is also included in the changeset.
If the link is not in the changeset, the script will still throw an error.

I manually tested the changes in this PR, by adding/removing a link to the website in the description and changes

Copilot AI review requested due to automatic review settings May 7, 2026 13:18
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 7, 2026

⚠️ No Changeset found

Latest commit: 009d849

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ChristopherDedominici ChristopherDedominici added no changeset needed This PR doesn't require a changeset no peer bump needed labels May 7, 2026
@ChristopherDedominici ChristopherDedominici moved this from Backlog to In Progress in Hardhat May 7, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the docs-link validation script used by the “Check that the PR links to documentation” workflow so that hardhat-website PR links in the PR body are only rejected when they aren’t also referenced via # docs: comments in changeset frontmatters.

Changes:

  • Extract hardhat-website PR links from the PR body and from changeset frontmatters, then compare them to detect unmatched body links.
  • Add URL normalization to make body/changeset comparisons consistent.
  • Improve the failure error message by listing the unmatched links and giving clearer guidance.

Comment thread scripts/validate-pull-request-docs.ts
Comment thread scripts/validate-pull-request-docs.ts Outdated
Copilot AI review requested due to automatic review settings May 7, 2026 13:27
@ChristopherDedominici ChristopherDedominici marked this pull request as ready for review May 7, 2026 13:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread scripts/validate-pull-request-docs.ts
@ChristopherDedominici ChristopherDedominici moved this from In Progress to In Review in Hardhat May 7, 2026
@ChristopherDedominici ChristopherDedominici added the no docs needed This PR doesn't require links to documentation label May 7, 2026
@ChristopherDedominici ChristopherDedominici changed the title Fix check on link to website doc PR Allow website doc link to be in the PR description May 7, 2026
@kanej kanej self-requested a review May 7, 2026 17:31
Copy link
Copy Markdown
Member

@kanej kanej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ChristopherDedominici ChristopherDedominici added this pull request to the merge queue May 8, 2026
Merged via the queue into main with commit ae1b145 May 8, 2026
25 of 40 checks passed
@ChristopherDedominici ChristopherDedominici deleted the script-to-check-pr-link-to-docs branch May 8, 2026 09:31
@github-project-automation github-project-automation Bot moved this from In Review to Done in Hardhat May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changeset needed This PR doesn't require a changeset no docs needed This PR doesn't require links to documentation no peer bump needed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants