fix(part-managed): native files without github_repo - #1047
Conversation
✅ Deploy Preview for gardener-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesFile classification
Estimated code review effort: 1 (Trivial) | ~5 minutes Mergeability Score: ⚪ Minimal · up to This localized change corrects native-file classification and the affected blog post metadata. No actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @VelmiraS
I'm unsure to which upstream repo you are referring, for the I think the issue is that we cannot expect a contributor to fill out this cryptic frontmatter. to fix the classification issue. I would recommend a one-time cleaning off all local files, to remove all of those fields: and then to also remove We just infer it from the frontmatter. If a file has a This would also allow us to drop what do you think? |
|
Thanks for the detailed feedback! I opened a PR with a small fix that addresses the current issue. I agree that the proposed refactor to drop the local/managed markers and infer everything directly from github_repo in config.mts and check-managed.mjs makes sense as a longer-term cleanup. |
|
@VelmiraS I am not sure, this would really improve the situation. I implemented a full fix in https://github.com/gardener/documentation/tree/fix/index-rename-and-classification and will open a PR within the next two days for it. |
|
or should I push it into this PR? |

What this PR does / why we need it:
post-processing/part-managed.js classified native blog posts (files committed directly to this repo, never processed by docforge) as managed: true instead of local: true. This broke the "Edit this page" button — it pointed to an upstream repo instead of the correct location in gardener/documentation.
Root cause: seedClassification only returned 'local' for files matching LOCAL_SUBDIR_PATTERN (website/...) or LOCAL_PATH_ALLOWLIST. Files without a github_repo field fell through to return 'managed'.
Fix: add an early return — if github_repo is absent, docforge never processed the file, so it is native to this repo and must be local: true.
Also corrects the existing misclassification of hugo/content/blog/2026/07/07-23-machine-preservation-on-failure-in-gardener.md, which was marked managed: true by a previous run of the unfixed script.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
The seedClassification change affects only files that have no local/managed marker yet (new files). Existing correctly-classified files are not re-evaluated. The data fix for the 07-23 blog post is a one-time correction for an already-misclassified file — future native blog posts will be classified correctly from the first script run.
Summary by CodeRabbit