Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

avivkeller
Copy link
Member

@avivkeller avivkeller commented Jul 28, 2025

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 revoked1

Validation

See #8040 (comment). In a real PR, these teams will be pinged.

Related Issues

Fixes #7292
Fixes #7294

Footnotes

  1. Unless they have it for a different reason

Copy link

vercel bot commented Jul 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Aug 5, 2025 6:02pm

Copy link

codecov bot commented Jul 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.82%. Comparing base (35f0004) to head (78cec81).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Requesting a review from the following teams:

  • nodejs/timers
  • nodejs/events
  • nodejs/repl
  • nodejs/diagnostics
  • nodejs/npm
  • nodejs/undici
  • nodejs/security-wg
  • nodejs/fs
  • nodejs/addon-api
  • nodejs/test_runner
  • nodejs/typescript

@avivkeller avivkeller marked this pull request as ready for review July 29, 2025 00:01
@Copilot Copilot AI review requested due to automatic review settings July 29, 2025 00:01
@avivkeller avivkeller requested review from a team as code owners July 29, 2025 00:01
Copy link
Contributor

@Copilot 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

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('---')) {

@avivkeller avivkeller added the github_actions:pull-request Trigger Pull Request Checks label Jul 29, 2025
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Jul 29, 2025
Copy link
Contributor

github-actions bot commented Jul 29, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 99 🟢 100 🟢 100 🟢 100 🔗
/en/about 🟢 100 🟢 97 🟢 100 🟠 88 🔗
/en/about/previous-releases 🟢 100 🟢 93 🟢 100 🟠 89 🔗
/en/download 🟢 95 🟢 100 🟢 100 🟢 100 🔗
/en/blog 🟢 99 🟢 100 🟢 96 🟢 100 🔗

@targos
Copy link
Member

targos commented Jul 29, 2025

  • I am not sure you can actually request reviews from teams that don't have write permission in the repo? At least I cannot do it from the GH UI (tried in this PR).
  • Some collaborators prefer not being requested for review because it clashes with their use of GH at work. That's one of the reasons we use team pings in core.

@avivkeller
Copy link
Member Author

avivkeller commented Jul 29, 2025

  • I am not sure you can actually request reviews from teams that don't have write permission in the repo? At least I cannot do it from the GH UI (tried in this PR).

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.

  • Some collaborators prefer not being requested for review because it clashes with their use of GH at work. That's one of the reasons we use team pings in core.

I have no preference either way

@flakey5
Copy link
Member

flakey5 commented Jul 29, 2025

Some collaborators prefer not being requested for review because it clashes with their use of GH at work

Doesn't it give them a notification either way?

@targos
Copy link
Member

targos commented Jul 29, 2025

IIRC it wasn't about notifications but this tab on github.com/pulls:
CleanShot 2025-07-29 at 17 39 34@2x

Copy link
Member

@ovflowd ovflowd left a 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.

@avivkeller
Copy link
Member Author

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.

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.

Map and add frontmatter on learn pages tying to core apis Expand CODEOWNERS to each learn section owner/advocate
7 participants