Skip to content

Improves PR comments from KB nav workflow#2347

Merged
dfinster merged 5 commits intomainfrom
df/improved-kb-nav-comments
Mar 27, 2026
Merged

Improves PR comments from KB nav workflow#2347
dfinster merged 5 commits intomainfrom
df/improved-kb-nav-comments

Conversation

@dfinster
Copy link
Copy Markdown
Member

@dfinster dfinster commented Mar 24, 2026

Summary

This change replaces the knowledgebase-nav workflow’s warnings-only pull request comment with a structured navigation report that summarizes what the generator changed (using git diff after generate_tags.py runs), and surfaces the same report in the Actions job summary for manual workflow_dispatch runs. Fork pull requests still do not receive an automated comment (unchanged).

WBDOCS-1997

Motivation

Reviewers and tech writers need a quick, repeatable summary of support navigation impact (articles, tag pages, product indexes, docs.json, root support.mdx, deletions, keyword-related counts, and unknown keywords) without reading full CI logs.

Changes

Workflow (.github/workflows/knowledgebase-nav.yml)

  • Pull requests (same-repo only): After the generator runs, the workflow runs scripts/knowledgebase-nav/pr_report.py, writes the Markdown to comment-body.md, and upserts a single issue comment identified by <!-- knowledgebase-nav-report --> (create or PATCH; no longer deletes the comment when there are no warnings).
  • workflow_dispatch: Appends the same Markdown (without the HTML marker) to $GITHUB_STEP_SUMMARY under a ## Knowledgebase navigation report heading so manual runs still get feedback when there is no PR.
  • Warning log step text updated to mention PR comment or job summary.

New script (scripts/knowledgebase-nav/pr_report.py)

  • Parses git diff --name-status HEAD and buckets paths into counts (badges/articles, modified tag pages, product indexes, root support.mdx, deletions, new tag pages, removed tag pages, docs.json).
  • Parses generator-warnings.log for distinct Unknown keyword strings (aligned with generate_tags.build_tag_index warning text).
  • Builds Markdown: category bullets (counts only), optional generator warnings fenced block, optional workflow run link via --run-url.
  • Fallback message when there is no diff, no unknown keywords, and no warnings: the explicit sentence about no updates to support articles, tag pages, product indexes, docs.json, or root support.mdx.
  • Documented for maintainers (module and function docstrings, section headers).

Tests (scripts/knowledgebase-nav/tests/test_pr_report.py)

  • Unit tests for parsing, categorization (including rename behavior for tag pages), unknown-keyword deduplication, Markdown output, and PR marker wrapping.

Risk / review focus

  • Comment marker change: Old comments used <!-- knowledgebase-nav-warnings -->; new runs use <!-- knowledgebase-nav-report -->. Stale old comments may remain on historical PRs until manually removed (low impact).
  • Fork PRs: Still no auto-comment; behavior unchanged by design.

Test plan

  • Run pytest scripts/knowledgebase-nav/tests/test_pr_report.py -v locally (or full scripts/knowledgebase-nav/tests/).
  • Open a same-repo PR that touches support/** or scripts/knowledgebase-nav/** and confirm the workflow posts or updates the navigation report comment.
  • Run Knowledgebase Nav from the Actions tab (workflow_dispatch) and confirm the job summary includes the report (including the fallback line when the generator makes no net changes).
  • Confirm fork PRs still skip the comment step but run the generator.

@dfinster dfinster requested a review from a team as a code owner March 24, 2026 14:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 24, 2026

Knowledgebase navigation update

  • Tag pages modified: 46 pages.
  • Product index pages updated: 3 pages.

From workflow run 23543252606

@mintlify
Copy link
Copy Markdown
Contributor

mintlify bot commented Mar 24, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
wandb 🟢 Ready View Preview Mar 24, 2026, 2:39 PM

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 25, 2026

📚 Mintlify Preview Links

🔗 View Full Preview

📝 Changed (49 total)

📄 Pages (49)

File Preview
support/inference.mdx Inference
support/inference/tags/administrator.mdx Administrator
support/inference/tags/authentication-access.mdx Authentication Access
support/inference/tags/billing.mdx Billing
support/inference/tags/quotas-rate-limits.mdx Quotas Rate Limits
support/inference/tags/server-errors.mdx Server Errors
support/models.mdx Models
support/models/tags/academic.mdx Academic
support/models/tags/administrator.mdx Administrator
support/models/tags/alerts.mdx Alerts
... and 39 more files

🤖 Generated automatically when Mintlify deployment succeeds
📍 Deployment: ef8e377 at 2026-03-25 13:25:02 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 25, 2026

🔗 Link Checker Results

All links are valid!

No broken links were detected.

Checked against: https://wb-21fd5541-df-improved-kb-nav-comments.mintlify.app

@dfinster dfinster merged commit 3a2ec65 into main Mar 27, 2026
7 checks passed
@dfinster dfinster deleted the df/improved-kb-nav-comments branch March 27, 2026 17:45
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.

2 participants