-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat(ci): request reviews from API experts #8040
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8040 +/- ##
==========================================
+ Coverage 72.77% 72.82% +0.04%
==========================================
Files 96 96
Lines 8328 8328
Branches 215 214 -1
==========================================
+ Hits 6061 6065 +4
+ Misses 2266 2262 -4
Partials 1 1 ☔ View full report in Codecov by Sentry. |
38b5ff3
to
d43388a
Compare
Requesting a review from the following teams:
|
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.
Pull Request Overview
This PR implements a new automated reviewer assignment system for Node.js documentation by mapping articles to API domains and their respective expert teams. The change replaces static CODEOWNERS assignments with dynamic review requests based on frontmatter metadata.
- Adds
api
frontmatter field to 51 learning documentation files to categorize content by Node.js API domain - Creates automated GitHub workflow to request reviews from appropriate API expert teams
- Removes static CODEOWNERS entries for TypeScript and security content in favor of the new dynamic system
Reviewed Changes
Copilot reviewed 54 out of 54 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
Multiple learn/*.md files | Added api frontmatter field to categorize content by Node.js API domain |
.github/workflows/request-review.yml | New workflow to automatically request reviews based on API categorization |
.github/scripts/get-reviewers.mjs | Script to parse frontmatter and map APIs to reviewer teams |
.github/reviewers.json | Configuration mapping API domains to GitHub teams |
.github/CODEOWNERS | Removed static assignments for TypeScript and security content |
Comments suppressed due to low confidence (1)
.github/scripts/get-reviewers.mjs:40
- [nitpick] The parameter name 'content' is too generic. Consider renaming it to 'fileContent' or 'markdownContent' to better indicate what it contains.
if (!content.trimStart().startsWith('---')) {
ad6bbae
to
f1b6706
Compare
apps/site/pages/en/learn/asynchronous-work/event-loop-timers-and-nexttick.md
Outdated
Show resolved
Hide resolved
Lighthouse Results
|
|
The API is different, AFAICT. To request via the UI, the team needs write access, however, using the API/GitHub Mobile, any team can be requested.
I have no preference either way |
Doesn't it give them a notification either way? |
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.
I'm against a per-file ownership setting. I rather use a symbolic file such as NODE_CODEOWNERS and have it laid out there in the same format you are allowed to on the real CODEOWNERS file.
Otherwise maintaining ownership of each file becomes a burden. If the data becomes stale or you need to mass update and remember you actually edited/updated every single place.
We are going to be mapping these files to APIs in core anyway, so that "burden" would already be on our shoulders, even without the ownership aspect, so-to-speak. Plus, it's not often that a given API for an article will change. If a team name changes, only the one JSON file needs to be updated. |
3bb1035
to
78cec81
Compare
Description
This is a potential solution for the linked issues, via mapping article -> api -> owner.
Prereqs:
@nodejs/typescript
write access revoked@nodejs/security-wg
write access revoked1Validation
See #8040 (comment). In a real PR, these teams will be pinged.
Related Issues
Fixes #7292
Fixes #7294
Footnotes
Unless they have it for a different reason ↩