Skip to content

feat: automate fetching and sanitization of webpack ecosystem readmes#122

Open
ryzrr wants to merge 6 commits into
mainfrom
feat/automated-readme-fetcher
Open

feat: automate fetching and sanitization of webpack ecosystem readmes#122
ryzrr wants to merge 6 commits into
mainfrom
feat/automated-readme-fetcher

Conversation

@ryzrr

@ryzrr ryzrr commented Jun 5, 2026

Copy link
Copy Markdown
Member

Issue Link : #103

Summary
Introduced fetch-readmes.mjs which fetches the readme of all loaders and plugins present in the webpack org and passes the md file to pipeline to generate the documentation.

What kind of change does this PR introduce?
New Feature (Build/Automation Script).

Did you add tests for your changes?
NO

Does this PR introduce a breaking change?
NO

If relevant, what needs to be documented once your changes are merged or what have you already documented?
NA

Use of AI
Yes, for testing and refinement of the regex and sanitization logic

Copilot AI review requested due to automatic review settings June 5, 2026 14:55
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-doc-kit Ready Ready Preview, Comment Jun 8, 2026 8:37pm

Request Review

@ryzrr

ryzrr commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

@avivkeller PTAL!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an automation script to pull README content from webpack/* loader and plugin repositories, lightly sanitize/normalize it, and emit Markdown pages that can be consumed by the existing doc generation pipeline.

Changes:

  • Introduce scripts/fetch-readmes.mjs to discover repos in the webpack org and fetch/write README-based docs.
  • Wire the new script into package.json npm scripts (including build).
  • Ignore generated pages/loaders and pages/plugins output directories.

Reviewed changes

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

File Description
scripts/fetch-readmes.mjs New GitHub API fetch + README sanitization + page generation script for loaders/plugins.
package.json Adds build targets for fetching readmes and runs them as part of npm run build.
.gitignore Ignores generated loaders/plugins pages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread package.json Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
@ryzrr

ryzrr commented Jun 6, 2026

Copy link
Copy Markdown
Member Author

Implemented few fixups and additional changes.

Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
Comment on lines +110 to +124
const GFM_ALERT_LABELS = {
NOTE: 'Note',
TIP: 'Tip',
IMPORTANT: 'Important',
WARNING: 'Warning',
CAUTION: 'Caution',
};
const GFM_ALERT_RE =
/^([ \t]*>[ \t]*)\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\][ \t]*$/gim;

const transformGfmAlerts = content =>
content.replace(
GFM_ALERT_RE,
(_, prefix, type) => `${prefix}**${GFM_ALERT_LABELS[type]}:**`
);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@ryzrr

ryzrr commented Jun 7, 2026

Copy link
Copy Markdown
Member Author

Thanks for the additional PRs , fixing merge conflicts of this PR !

Copilot AI review requested due to automatic review settings June 7, 2026 12:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 7 out of 8 changed files in this pull request and generated 6 comments.

Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
Comment thread pages/site.mjs Outdated
Comment thread scripts/html/doc-kit.config.mjs
Comment thread scripts/fetch-readmes.mjs Outdated
Co-authored-by: Aviv Keller <me@aviv.sh>
Copilot AI review requested due to automatic review settings June 7, 2026 13:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 7 out of 8 changed files in this pull request and generated 2 comments.

Comment thread pages/site.mjs Outdated
Comment thread scripts/fetch-readmes.mjs Outdated
@avivkeller

Copy link
Copy Markdown
Member

I can investigate the failure more if needed tomorrow, but Vercel is having an issue resolving import

@ryzrr

ryzrr commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

I can investigate the failure more if needed tomorrow, but Vercel is having an issue resolving import

Sure , Actually , i tried looking for the issue but was unable to caught . But i'll also look one more time today

@ryzrr

ryzrr commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

@avivkeller can you please help me fix out the vercel error in your free time . as I cant see exactly what error is causing the build to fail

Copilot AI review requested due to automatic review settings June 8, 2026 20:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@avivkeller

Copy link
Copy Markdown
Member

@ryzrr looks like sanitization is having some issues on:

Also, it looks like some local links in those files aren't working

@avivkeller

Copy link
Copy Markdown
Member

I think some of these issues can be resolved on the README-end, just let me know what you think

@ryzrr

ryzrr commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

Yes I also think we should handle it on the readme level as major of them follows nearly same structure , only a few deviates from it

@ryzrr

ryzrr commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

No reviews from my sides, look great !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants