Skip to content

Bump the versioned branch links too when updating a release The second replace used old_version on both sides, so it did nothing and links like .../tensorflow/blob/r2.20/... kept pointing at the old release branch after running the script. - #2447

Open
rootkiller6788 wants to merge 1 commit into
tensorflow:masterfrom
rootkiller6788:fix-update-versions-branch-url

Conversation

@rootkiller6788

Copy link
Copy Markdown

Ran this script for a release update and noticed the branch links in the docs never move: the replace on these lines passes old_version on both sides, so it matches and writes back the same string. The version number itself goes up (that replace is above), but every link like github.com/tensorflow/tensorflow/blob/r2.20/... stays on the old release branch.

One character fix, use new_version on the right.

How I checked it: put a small md file with 2.20.0 and a blob/r2.20/ link in a temp dir, ran the script with --old_version 2.20.0 --new_version 2.21.0 before and after the change. Before: Version 2.21.0 is current. but the link is still blob/r2.20/. After: blob/r2.21/.

The second replace used old_version on both sides, so it did nothing and
links like .../tensorflow/blob/r2.20/... kept pointing at the old release
branch after running the script.
@github-actions

Copy link
Copy Markdown

Preview

Preview and run these notebook edits with Google Colab: Rendered notebook diffs available on ReviewNB.com.

Format and style

Use the TensorFlow docs notebook tools to format for consistent source diffs and lint for style:
$ python3 -m pip install -U --user git+https://github.com/tensorflow/docs

$ python3 -m tensorflow_docs.tools.nbfmt notebook.ipynb
$ python3 -m tensorflow_docs.tools.nblint --arg=repo:tensorflow/docs notebook.ipynb
If commits are added to the pull request, synchronize your local branch: git pull origin fix-update-versions-branch-url

@rootkiller6788
rootkiller6788 marked this pull request as ready for review October 16, 2026 03:58
@rootkiller6788
rootkiller6788 requested a review from a team as a code owner October 16, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant