docs: fix version numbering
Metadata
Current evaluation
Merged documentation fix aligning ReadTheDocs version numbering with the new branch-based release policy. Incorporated reviewer feedback to refactor conditional logic and add comments. Updated version detection for main, hotfix, and PR branches.
Suggested action: —
No scores available.
Issue body
With the new release policy, the RTD version is based on branches, not tags. So, in the RTD environment we need to rely on different data, and the local builds should match it so the results are the same.
Tested locally with the following RTD environment values.
Main branch:
```
os.environ["READTHEDOCS_VERSION"] = "latest"
os.environ["READTHEDOCS_VERSION_TYPE"] = "branch"
os.environ["READTHEDOCS_GIT_IDENTIFIER"] = "main"
```
Hotfix branch:
```
os.environ["READTHEDOCS_VERSION"] = "9.0"
os.environ["READTHEDOCS_VERSION_TYPE"] = "branch"
os.environ["READTHEDOCS_GIT_IDENTIFIER"] = "hotfix/9.0"
```
PR branch:
```
os.environ["READTHEDOCS_VERSION"] = "1357"
os.environ["READTHEDOCS_VERSION_TYPE"] = "external"
os.environ["READTHEDOCS_GIT_IDENTIFIER"] = "my-fork/my-branch"
```
---
- [x] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md).
- [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [x] I've successfully run `make lint && make test`.
- [ ] I've added or updated any relevant documentation.
- [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing.
- [ ] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged documentation fix aligning ReadTheDocs version numbering with the new branch-based release policy. Incorporated reviewer feedback to refactor conditional logic and add comments. Updated version detection for main, hotfix, and PR branches. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
5
Complexity:
15
Confidence:
90
|
needs review | Updates ReadTheDocs versioning logic to align with branch-based environments. Author addressed reviewer feedback on code structure and pushed updates. Awaiting final maintainer review. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2787 docs: fix versioning logic | charmcraft | merged | Merged. Fixes branch-based documentation build versioning logic by correcting version name generation. Passed all CI checks and received reviewer approval. | |
| #586 docs: fix incorrect version in documentation | rockcraft | merged | Merged to resolve #584. Configured ReadTheDocs to fetch tags and updated non-release documentation to display dev instead of misleading release strings. Approved by two reviewers with passing CI. | |
| #2830 docs: fix version string for 'latest' | charmcraft | merged | Merged documentation fix correcting the version string for the 'latest' branch build. Updates ReadTheDocs slug handling to display major/minor versions for local and branch builds, while 'latest' shows 'dev'. All CI checks passed. | |
| #1335 docs: fix version string for 1.x | rockcraft | merged | Merged to a hotfix branch, fixing 1.x documentation version strings to show major.minor locally and in branches, with latest showing dev. Approved by three reviewers and passed all CI checks after clarifying its scope relative to PR 1334. | |
| #6313 docs: fix version numbering | snapcraft | merged | Merged documentation update fixing version numbering by applying patch from #6295. Approved by reviewer, passed CI checks, and successfully merged with 7 lines changed across one file. | |
| #588 docs: fix version in title | starbase | merged | Merged documentation update correcting version display in titles. Builds now show major and minor versions, with latest displaying dev. Approved by two reviewers and passed all CI checks. | |
| #2832 docs: fix version string for 4.x | charmcraft | merged | Merged. Updated documentation to correctly display major and minor version strings for local, PR, and branch builds, reserving 'dev' for the latest branch. Approved by one reviewer with all CI checks passing. | |
| #2831 docs: fix version string for 3.x | charmcraft | merged | Merged docs fix for 3.x version string. Local, PR, and branch builds now show major and minor version in the title, while latest shows 'dev'. Aligns with simplified Read the Docs slugs. Approved and merged. | |
| #1334 docs: fix version string on latest | rockcraft | merged | Merged documentation fix updating version string display. Local, PR, and branch builds now show major and minor versions, while the latest branch displays dev. Aligns with simplified RTD version slugs. | |
| #6387 docs: fix version on 'latest' | snapcraft | merged | Merged PR updates Read the Docs slug handling to fix version display on the 'latest' branch. Local, PR, and branch builds now show major/minor versions, while 'latest' displays 'dev'. Approved by reviewers and passed all CI checks. |