Skip to content

chore: improve product labeling for issues and changelogs - #33394

Merged
mvvmm merged 6 commits into
productionfrom
chore/improve-product-labeling
Sep 14, 2026
Merged

mvvmm merged 6 commits into
productionfrom
chore/improve-product-labeling

Conversation

@mvvmm

@mvvmm mvvmm commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Improves product labeling across issues and PRs:

  • Issue assigner: lowercases the docs URL before deriving the product: label, so /API/... produces product:api instead of creating a separate product:API label.
  • PR labeler: removes product:_headers and product:_redirects — those map root config files, not products.
  • Changelog labeling: adds per-product changelog globs so a changelog PR gets both the actual product label (e.g. product:workers) and the existing product:changelog label.
  • Generator: adds bin/generate-labeler.ts (pnpm run generate:labeler) that regenerates .github/labeler.yml from the content collections. The labeler header previously claimed the file was generated but no generator was committed.

The changelog mapping is derived from src/content/directory/*.yaml entry.url first segments (e.g. Zero Trust sub-products like access, gateway, casb map to cloudflare-one).

Behavior note: deriving release-notes from productLink also adds three previously-unlabeled release-notes files (workers.yaml, workflows.yaml, zaraz.yaml) to their product rules — a change to those files previously got no product label.

@mvvmm
mvvmm marked this pull request as ready for review September 11, 2026 16:32
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Review

✅ No issues found in commit cb94361.

Code Review

This code review is in beta and may not always be helpful — use your judgment.

No code review issues found.

Conventions

No convention issues found.

Style Guide Review

No style-guide issues found.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.
/rebase Rebases the PR branch against production. On conflict, attempts to resolve automatically using AI. Stops with an explanation if confidence is not high enough.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 11, 2026

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://chore-improve-product-labeling.previews.developers.cloudflare.com (commit cb94361)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://70532883.previews.developers.cloudflare.com cb94361 2026-09-14T19:56:34.062Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://7579045e.previews.developers.cloudflare.com 6313b40 2026-09-14T19:17:06.483Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a2a60db9.previews.developers.cloudflare.com 82cc056 2026-09-11T18:16:49.362Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b195c29e.previews.developers.cloudflare.com 5ada10d 2026-09-11T17:46:53.365Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://483a66d6.previews.developers.cloudflare.com 62f66bf 2026-09-11T16:42:50.287Z Visit the dashboard ↗

@mvvmm

mvvmm commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

/rebase

@mvvmm
mvvmm force-pushed the chore/improve-product-labeling branch from 137bf67 to 5ada10d Compare September 11, 2026 17:31
@github-actions

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/.github/ @ahaywood, @colbywhite, @MohamedH1998, @mvvmm, @cloudflare/content-engineering
*.ts @cloudflare/content-engineering
package.json @cloudflare/content-engineering
* @cloudflare/product-owners

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

- readDir now fails loudly instead of returning [] on error, so a
  missing/renamed primary input dir aborts instead of silently dropping
  product rules and overwriting labeler.yml
- refuse to write labeler.yml when no rules were generated
- merge special rule globs with any existing rule instead of
  overwriting, so a future docs dir named changelog/email-routing
  wouldn't silently replace the special rule

Regenerating also picks up src/assets/images/sandbox/** for
product:sandbox (previously missed due to a stale working tree).
- firstUrlSegment now normalizes absolute URLs via new URL().pathname,
  so an absolute entry.url/productLink no longer yields a bogus 'https:'
  segment
- share the changelog folder alias map between content and image
  changelog mappings instead of only applying it to images
- skip (with a warning) changelog folders that have no directory entry
  or no entry.url instead of crashing the generator
Only skip changelog folders missing a directory YAML (ENOENT) and rethrow
parse/other I/O errors; guard URL parsing so malformed URLs skip the entry
instead of crashing the generator.
@mvvmm
mvvmm force-pushed the chore/improve-product-labeling branch from 6313b40 to 1a49b17 Compare September 14, 2026 19:33
@mvvmm
mvvmm merged commit 021346c into production Sep 14, 2026
18 checks passed
@mvvmm
mvvmm deleted the chore/improve-product-labeling branch September 14, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants