Lee-W commented on code in PR #71477:
URL: https://github.com/apache/airflow/pull/71477#discussion_r4045694303
##########
dev/registry/extract_versions.py:
##########
@@ -181,6 +197,26 @@ def get_source_file_path(layout: str, dir_path: str,
module_path: str) -> str:
return f"providers/src/{rel_file}"
+def read_guide_docs(tag: str, layout: str, dir_path: str) -> dict[str, str]:
+ """Read a provider's authored reST docs at a tag, keyed by path relative
to its docs dir.
+
+ Only the per-provider layout keeps docs beside the provider; under the old
flat
+ layout they lived in a top-level ``docs/`` tree, so those tags get no guide
+ links rather than links guessed from a path that moved.
+ """
+ if layout != "new":
+ return {}
+
+ docs_prefix = f"providers/{dir_path}/docs/"
+ docs: dict[str, str] = {}
+ for path in git_ls_tree(tag, docs_prefix):
+ if not path.endswith(".rst"):
Review Comment:
Same `is_guide_page` filter here, applied to the `git_ls_tree` listing
before `git_show`, so skipped pages are never read at all.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]