Repository navigation
Fixes branch name in docs (#5953) - #5964
Conversation
# Description Fixes issue in built docs where doc names in clone command didn't follow the actual version of the doc. Previously, when develop triggered a multiversion docs deploy, even the release/3.0.0-beta2 generated pages used develop. Now: - multiversion docs use smv_current_version - single-version/local docs fall back to isaaclab_latest_branch ## Type of change - Documentation update ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task -->
There was a problem hiding this comment.
🤖 Isaac Lab Review Bot
Summary
This PR fixes an issue where the documentation clone commands displayed incorrect branch names. Previously, when a multiversion docs deploy was triggered from develop, even the release/3.0.0-beta2 generated pages incorrectly used develop as the branch name.
The fix adds a check in docs/_extensions/isaaclab_docs.py for smv_current_version (set by sphinx-multiversion) and uses it when available, falling back to isaaclab_latest_branch (defaulting to main) for single-version/local builds.
Findings
No issues found. The change is minimal and well-scoped:
- Adds a 3-line early return that checks
config.smv_current_versionfirst - Falls back to the existing
isaaclab_latest_branchbehavior when not in a multiversion build - Docstring updated to reflect the broader scope (branch or tag)
Verdict
No issues found — Clean docs fix with correct fallback logic.
Greptile SummaryThis PR fixes a documentation bug where multiversion doc builds always used
Confidence Score: 5/5Safe to merge — the change is a minimal, additive fix to a Sphinx extension helper with no impact on runtime logic or tests. The three-line addition uses a safe getattr with a fallback default, preserves existing single-version behaviour entirely, and directly matches the stated intent. There is no altered control flow outside the docs build step. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["_branch(config) called"] --> B{"smv_current_version\nset and non-empty?"}
B -->|"Yes - multiversion build"| C["Return smv_current_version\ne.g. release/3.0.0-beta2"]
B -->|"No - local/single-version"| D{"isaaclab_latest_branch\nconfigured?"}
D -->|Yes| E["Return isaaclab_latest_branch"]
D -->|No| F["Return 'main'"]
C --> G["Used in all clone snippets"]
E --> G
F --> G
Reviews (1): Last reviewed commit: "Fixes branch name in docs (#5953)" | Re-trigger Greptile |
Description
Fixes issue in built docs where doc names in clone command didn't follow the actual version of the doc.
Previously, when develop triggered a multiversion docs deploy, even the release/3.0.0-beta2 generated pages used develop.
Now:
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists thereDescription
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there