Skip to content

fix(beta): pass --git-ref main so edit links work - #1259

Merged
avivkeller merged 1 commit into
nodejs:mainfrom
vedchaudhari:fix-edit-url
Nov 26, 2026
Merged

avivkeller merged 1 commit into
nodejs:mainfrom
vedchaudhari:fix-edit-url

Conversation

@vedchaudhari

@vedchaudhari vedchaudhari commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

"Edit this page" links on beta.docs.nodejs.org 404, e.g. https://github.com/nodejs/node/edit/HEAD/doc/api/index.md. GitHub can only edit files on a branch, and the beta build never sets ref, so it stays on the 'HEAD' default.

This passes --git-ref main in the beta build script, so the links become .../edit/main/doc/api/<page>.md. Source links use main too, which is where HEAD pointed anyway.

Validation

  • Loaded the beta config with --git-ref main: the edit link for buffer.md is https://github.com/nodejs/node/edit/main/doc/api/buffer.md (without it, edit/HEAD/...).
  • node --run test, format:check and lint pass.

Related Issues

None found.

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
  • I have check code formatting with node --run format:check & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

@vedchaudhari
vedchaudhari requested a review from a team as a code owner November 17, 2026 07:09
@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
api-docs-tooling Ready Ready Preview Nov 24, 2026 3:33am UTC

Request Review

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.79%. Comparing base (ad826e4) to head (3dfe54e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1259   +/-   ##
=======================================
  Coverage   93.79%   93.79%           
=======================================
  Files         294      294           
  Lines       30476    30476           
  Branches     3100     3100           
=======================================
  Hits        28584    28584           
  Misses       1870     1870           
  Partials       22       22           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

api-links Generator

Performance estimate (single CI run)

  • Generation time: 23.5% faster (980.00 ms → 750.00 ms)
  • Peak memory: 3.0% higher (273.61 MB → 281.84 MB)

json Generator

Performance estimate (single CI run)

  • Generation time: 38.9% slower (6.60 s → 9.17 s)
  • Peak memory: 2.1% lower (922.53 MB → 902.95 MB)

legacy-html Generator

Performance estimate (single CI run)

  • Generation time: 7.2% slower (13.92 s → 14.92 s)
  • Peak memory: 3.3% higher (1.35 GB → 1.40 GB)

legacy-json Generator

Performance estimate (single CI run)

  • Generation time: 21.0% faster (7.28 s → 5.75 s)
  • Peak memory: 2.6% higher (915.02 MB → 938.77 MB)

llms-txt Generator

Performance estimate (single CI run)

  • Generation time: 2.7% slower (5.46 s → 5.61 s)
  • Peak memory: 5.1% higher (851.65 MB → 895.50 MB)

orama-db Generator

Performance estimate (single CI run)

  • Generation time: 17.8% faster (7.36 s → 6.05 s)
  • Peak memory: 2.2% higher (998.16 MB → 1019.93 MB)

web Generator

Performance estimate (single CI run)

  • Generation time: 22.8% faster (18.08 s → 13.95 s)
  • Peak memory: 3.1% higher (1.49 GB → 1.54 GB)

@vedchaudhari vedchaudhari changed the title fix(config): point edit links at the main branch fix: fall back to main in edit links when the ref isn't a branch Nov 18, 2026
Signed-off-by: vedchaudhari <vedc2853@gmail.com>
@vedchaudhari vedchaudhari changed the title fix: fall back to main in edit links when the ref isn't a branch fix(beta): pass --git-ref main so edit links work Nov 24, 2026
@avivkeller
avivkeller enabled auto-merge (squash) November 25, 2026 19:46
@avivkeller
avivkeller disabled auto-merge November 26, 2026 16:32
@avivkeller
avivkeller merged commit 582b271 into nodejs:main Nov 26, 2026
23 checks passed

This branch was successfully deployed

1 active deployment
Preview – api-docs-tooling — 3dfe54ef Deployed Nov 24, 2026 by vercel[bot]
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