- name: Install dependencies
run: pip install absl-py mistune gftools
- name: Check Knowledge graph
- run: python3 .github/workflows/knowledge_graph.py
+ run: python3 .github/workflows/knowledge_graph.py --check_outbound_links
flags.DEFINE_bool("print_valid", False, "Whether to print valid links")
+flags.DEFINE_bool("check_outbound_links", False, "Check outbound urls")
MdValue = Union[Mapping[str, "MdValue"]]
if not target:
continue # TODO: are empty links bad
if re.search("^http(s)?://", target.lower()):
- result = _check_outbound_link(target) and result
+ if FLAGS.check_outbound_links:
+ result = _check_outbound_link(target) and result
else:
target_path = knowledge.link_target_to_path(target)
result = _check_file_present(knowledge.repo_root, md_file, target, target_path) and result