Skip to content

Fixes branch name in docs (#5953) - #5964

Merged
kellyguo11 merged 1 commit into
isaac-sim:release/3.0.0-beta2from
kellyguo11:cherry-pick-doc-fix
Jun 4, 2026
Merged

kellyguo11 merged 1 commit into
isaac-sim:release/3.0.0-beta2from
kellyguo11:cherry-pick-doc-fix

Conversation

@kellyguo11

Copy link
Copy Markdown
Contributor

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

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • 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

Description

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Screenshots

Please attach before and after screenshots of the change if applicable.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • 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

# 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
-->
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation labels Jun 4, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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_version first
  • Falls back to the existing isaaclab_latest_branch behavior 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-apps

greptile-apps Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a documentation bug where multiversion doc builds always used develop as the branch name in clone commands, regardless of which version's pages were being generated. It adds a check for smv_current_version (sphinx-multiversion's current version attribute) in the _branch() helper, falling back to isaaclab_latest_branch only for single-version or local builds.

  • The _branch() function now returns smv_current_version when present and non-empty, so each versioned doc build (e.g., release/3.0.0-beta2) shows the correct branch in every clone snippet.
  • Single-version and local builds are unaffected: they continue to fall back to the isaaclab_latest_branch config value (defaulting to "release/3.0.0-beta2").

Confidence Score: 5/5

Safe 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

Filename Overview
docs/_extensions/isaaclab_docs.py Adds smv_current_version priority in _branch() helper so multiversion docs show the correct branch in clone commands; fallback behaviour for local/single-version builds is preserved.

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
Loading

Reviews (1): Last reviewed commit: "Fixes branch name in docs (#5953)" | Re-trigger Greptile

@kellyguo11
kellyguo11 merged commit 73878da into isaac-sim:release/3.0.0-beta2 Jun 4, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant