Skip to content

Workflow to sync mkdocs.yml from single source of truth pgedge-doc-sources/sources.yml#83

Merged
dpage merged 2 commits into
mainfrom
workflow-for-ssot-changes
May 8, 2026
Merged

Workflow to sync mkdocs.yml from single source of truth pgedge-doc-sources/sources.yml#83
dpage merged 2 commits into
mainfrom
workflow-for-ssot-changes

Conversation

@maqeel75
Copy link
Copy Markdown
Member

@maqeel75 maqeel75 commented May 8, 2026

Summary by CodeRabbit

  • Chores
    • Added automated drift detection for documentation imports against the canonical source of truth.
    • Auto-applies fixes for detected inconsistencies, including converting import URLs to HTTPS and inserting/sorting missing versioned entries.
    • Automatically opens or updates pull requests with a generated drift report and avoids creating redundant PRs.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8775eefe-6f74-4bb1-81b4-d1b6761838d1

📥 Commits

Reviewing files that changed from the base of the PR and between 127b440 and c7d2f84.

📒 Files selected for processing (1)
  • .github/workflows/sync-mkdocs.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/sync-mkdocs.yml

Walkthrough

This pull request adds a GitHub Actions workflow that compares versioned imports in mkdocs.yml against a SSOT sources.yaml, detects SSH import URLs and missing versioned nav entries, generates a drift report, rewrites mkdocs.yml (SSH→HTTPS and insert sorted missing versions), pushes to auto/sync-mkdocs only if content differs, and creates or updates a PR with the report.

Changes

mkdocs.yml Drift Detection and Auto-Sync Workflow

Layer / File(s) Summary
Workflow header & env/permissions
.github/workflows/sync-mkdocs.yml
Workflow metadata, permissions, job declaration, and environment variables for target mkdocs.yml, base branch, fix branch, and SSOT URL.
Drift detection & mkdocs rewrite
.github/workflows/sync-mkdocs.yml
Embedded script loads sources.yaml and mkdocs.yml, detects SSH import URLs and missing versioned nav entries, writes /tmp/drift-report.md, converts SSH→HTTPS, and inserts missing versioned nav entries into the appropriate repo nav blocks sorted by version.
Push fix branch (duplicate detection)
.github/workflows/sync-mkdocs.yml
Checks remote fix branch mkdocs.yml for identical content; skips push if identical, otherwise commits and force-pushes updated mkdocs.yml to auto/sync-mkdocs.
Create or update PR
.github/workflows/sync-mkdocs.yml
Lists open PRs for the fix branch and either updates the PR body with the generated drift report or creates a new PR using the report as the body.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: adding a workflow to synchronize mkdocs.yml from a single source of truth configuration file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch workflow-for-ssot-changes

Comment @coderabbitai help to get the list of available commands and usage tips.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 8, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/sync-mkdocs.yml:
- Around line 76-92: The function get_import_info may raise a KeyError because
it uses entry['upstream_git_source'] directly; change that to use
entry.get('upstream_git_source') and guard the downstream checks so you only
return (upstream, up_tag) or (upstream, up_branch) when upstream is truthy
(e.g., if upstream and up_tag: ... and if upstream and up_branch: ...), keeping
all other .get() usage consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a9596171-918d-4565-ad4a-b9054d766456

📥 Commits

Reviewing files that changed from the base of the PR and between 4e7b273 and 127b440.

📒 Files selected for processing (1)
  • .github/workflows/sync-mkdocs.yml

Comment thread .github/workflows/sync-mkdocs.yml
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 8, 2026

Deploying pgedge-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: c7d2f84
Status: ✅  Deploy successful!
Preview URL: https://e43442f8.pgedge-docs.pages.dev
Branch Preview URL: https://workflow-for-ssot-changes.pgedge-docs.pages.dev

View logs

@maqeel75 maqeel75 requested a review from dpage May 8, 2026 09:52
@dpage dpage merged commit f36af7f into main May 8, 2026
4 checks passed
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