Skip to content

Commit

Permalink
Fix to point to correct commit not just branch (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
vatj authored Apr 5, 2024
1 parent 5813d39 commit a88ea27
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions auto_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,22 @@
}

hw_dir = pathlib.Path(__file__).resolve().parents[0]
if "GITHUB_BASE_REF" in os.environ:
branch_name = os.environ["GITHUB_BASE_REF"]
if "GITHUB_SHA" in os.environ:
commit_sha = os.environ["GITHUB_SHA"]
project_url = (
f"https://github.com/logicalclocks/feature-store-api/tree/{commit_sha}/python"
)
else:
branch_name = "master"
branch_name = os.environ.get("GITHUB_BASE_REF", "master")
project_url = (
f"https://github.com/logicalclocks/feature-store-api/blob/{branch_name}/python"
)


def generate(dest_dir):
doc_generator = keras_autodoc.DocumentationGenerator(
PAGES,
project_url=f"https://github.com/logicalclocks/hopsworks-api/blob/{branch_name}/python",
project_url=project_url,
template_dir="./docs/templates",
titles_size="###",
extra_aliases={},
Expand Down

0 comments on commit a88ea27

Please sign in to comment.