Skip to content

[24299] Add fallback branch for master links #1241

Merged
emiliocuestaf merged 10 commits intomasterfrom
basic/feature/fallback-branch-for-master-links
Apr 6, 2026
Merged

[24299] Add fallback branch for master links #1241
emiliocuestaf merged 10 commits intomasterfrom
basic/feature/fallback-branch-for-master-links

Conversation

@emiliocuestaf
Copy link
Copy Markdown
Contributor

@emiliocuestaf emiliocuestaf commented Mar 27, 2026

Description

Fix GitHub links in the documentation to always point to the correct branch instead of defaulting master/main

get_git_branch() now reads READTHEDOCS_VERSION on RTD builds (for branch and tag builds) instead of relying on git name-rev, which returned weird names like "external-1234". There are 3 possible cases for RTD builds now:

  • Branch builds -> Github links refer to the branch itself
  • Tag builds -> Github links refer to the tag itself
  • PR preview builds (VERSION_TYPE=external) now return None and fall back to the default branch as it seemed impossible to get the real branch name.

@Mergifyio backport 3.5.x 3.4.x 3.2.x 2.14.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • Code snippets related to the added documentation have been provided.
  • Documentation tests pass locally.
  • The Pro version badge has been added if the documented feature is exclusive to Fast DDS Pro.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • CI passes without warnings or errors.

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
@emiliocuestaf emiliocuestaf added this to the v3.6.1 milestone Mar 27, 2026
@emiliocuestaf emiliocuestaf marked this pull request as draft March 30, 2026 05:57
Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
@emiliocuestaf emiliocuestaf force-pushed the basic/feature/fallback-branch-for-master-links branch from e8f5c5b to 8cbee1c Compare March 30, 2026 07:33
@emiliocuestaf emiliocuestaf requested review from richiprosima and removed request for richiprosima March 30, 2026 07:33
Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
@emiliocuestaf emiliocuestaf changed the title Add fallback branch for master links [24299] Add fallback branch for master links Mar 30, 2026
@emiliocuestaf emiliocuestaf marked this pull request as ready for review March 30, 2026 09:19
@emiliocuestaf emiliocuestaf requested review from richiprosima and removed request for richiprosima March 30, 2026 11:01
Copy link
Copy Markdown
Contributor

@raulojeda22 raulojeda22 left a comment

Choose a reason for hiding this comment

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

Nits

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
Copy link
Copy Markdown
Contributor

@raulojeda22 raulojeda22 left a comment

Choose a reason for hiding this comment

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

LGTM

@emiliocuestaf emiliocuestaf merged commit 60e9c7d into master Apr 6, 2026
5 checks passed
@emiliocuestaf emiliocuestaf deleted the basic/feature/fallback-branch-for-master-links branch April 6, 2026 06:30
@emiliocuestaf
Copy link
Copy Markdown
Contributor Author

https://github.com/Mergifyio backport 3.5.x 3.4.x 3.2.x 2.14.x

@mergify
Copy link
Copy Markdown

mergify bot commented Apr 6, 2026

backport 3.5.x 3.4.x 3.2.x 2.14.x

✅ Backports have been created

Details

Cherry-pick of 60e9c7d has failed:

On branch mergify/bp/3.2.x/pr-1241
Your branch is up to date with 'origin/3.2.x'.

You are currently cherry-picking commit 60e9c7d.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   docs/fastdds/discovery/discovery_server.rst
	modified:   docs/fastdds/discovery/static.rst
	modified:   docs/fastdds/getting_started/simple_app/includes/sum_and_next_steps.rst
	modified:   docs/fastdds/getting_started/simple_python_app/includes/sum_and_next_steps.rst
	modified:   docs/fastdds/rtps_layer/rtps_layer.rst
	modified:   docs/fastdds/security/access_control_plugin/access_control_plugin.rst
	modified:   docs/fastdds/transport/shared_memory/shared_memory.rst
	modified:   docs/fastdds/transport/tcp/tcp.rst
	modified:   docs/fastdds/use_cases/request_reply/request_reply.rst
	modified:   docs/fastdds/use_cases/statistics_module/statistics_module.rst
	modified:   docs/fastdds/use_cases/well_known_deployments/well_known_deployments.rst
	modified:   docs/fastdds/use_cases/zero_copy/zero_copy.rst
	modified:   docs/fastdds/xml_configuration/making_xml_profiles.rst
	modified:   docs/fastddsgen/pubsub_app/includes/sum_and_next_steps.rst
	modified:   docs/installation/sources/sources_linux.rst
	modified:   docs/installation/sources/sources_mac.rst
	modified:   docs/installation/sources/sources_windows.rst
	modified:   docs/notes/migration_guide.rst
	modified:   docs/notes/notes.rst
	modified:   docs/notes/previous_versions/v2.6.10.rst
	modified:   docs/notes/previous_versions/v2.6.11.rst
	modified:   docs/notes/previous_versions/v2.6.9.rst
	modified:   docs/notes/previous_versions/v3.0.0.rst
	modified:   docs/notes/versions.rst

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   docs/conf.py
	deleted by us:   docs/fastddsgen/rpc_calculator_basic_app/includes/app.rst
	deleted by us:   docs/fastddsgen/rpc_calculator_basic_app/intro.rst
	deleted by us:   docs/fastddsgen/rpc_calculator_feed_app/includes/app.rst
	deleted by us:   docs/fastddsgen/rpc_calculator_feed_app/intro.rst
	both modified:   docs/fastddsgen/usage/usage.rst
	both modified:   docs/installation/configuration/cmake_options.rst

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Cherry-pick of 60e9c7d has failed:

On branch mergify/bp/2.14.x/pr-1241
Your branch is up to date with 'origin/2.14.x'.

You are currently cherry-picking commit 60e9c7d.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   docs/notes/notes.rst
	modified:   docs/notes/previous_versions/v2.6.10.rst
	modified:   docs/notes/previous_versions/v2.6.11.rst
	modified:   docs/notes/previous_versions/v2.6.9.rst
	modified:   docs/notes/versions.rst

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   docs/conf.py
	both modified:   docs/fastdds/discovery/discovery_server.rst
	both modified:   docs/fastdds/discovery/static.rst
	both modified:   docs/fastdds/getting_started/simple_app/includes/sum_and_next_steps.rst
	both modified:   docs/fastdds/getting_started/simple_python_app/includes/sum_and_next_steps.rst
	both modified:   docs/fastdds/rtps_layer/rtps_layer.rst
	both modified:   docs/fastdds/security/access_control_plugin/access_control_plugin.rst
	both modified:   docs/fastdds/transport/shared_memory/shared_memory.rst
	both modified:   docs/fastdds/transport/tcp/tcp.rst
	both modified:   docs/fastdds/use_cases/request_reply/request_reply.rst
	both modified:   docs/fastdds/use_cases/statistics_module/statistics_module.rst
	both modified:   docs/fastdds/use_cases/well_known_deployments/well_known_deployments.rst
	both modified:   docs/fastdds/use_cases/zero_copy/zero_copy.rst
	both modified:   docs/fastdds/xml_configuration/making_xml_profiles.rst
	both modified:   docs/fastddsgen/pubsub_app/includes/sum_and_next_steps.rst
	deleted by us:   docs/fastddsgen/rpc_calculator_basic_app/includes/app.rst
	deleted by us:   docs/fastddsgen/rpc_calculator_basic_app/intro.rst
	deleted by us:   docs/fastddsgen/rpc_calculator_feed_app/includes/app.rst
	deleted by us:   docs/fastddsgen/rpc_calculator_feed_app/intro.rst
	both modified:   docs/fastddsgen/usage/usage.rst
	both modified:   docs/installation/configuration/cmake_options.rst
	both modified:   docs/installation/sources/sources_linux.rst
	both modified:   docs/installation/sources/sources_mac.rst
	both modified:   docs/installation/sources/sources_windows.rst
	deleted by us:   docs/notes/migration_guide.rst
	deleted by us:   docs/notes/previous_versions/v3.0.0.rst

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

mergify bot pushed a commit that referenced this pull request Apr 6, 2026
* Add first version of build with master fallback

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Minor branch fix

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Separate python_branch and python fallback branch

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Update repos

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Add same fallback logic as in ReadTheDocs checkouts and logs

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Changes substitution-block per code-block

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Fix refs

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Tests with read the docs env variables

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Resolving problem when building from RTD

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Apply review

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

---------

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
(cherry picked from commit 60e9c7d)
mergify bot pushed a commit that referenced this pull request Apr 6, 2026
* Add first version of build with master fallback

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Minor branch fix

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Separate python_branch and python fallback branch

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Update repos

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Add same fallback logic as in ReadTheDocs checkouts and logs

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Changes substitution-block per code-block

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Fix refs

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Tests with read the docs env variables

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Resolving problem when building from RTD

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Apply review

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

---------

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
(cherry picked from commit 60e9c7d)
mergify bot pushed a commit that referenced this pull request Apr 6, 2026
* Add first version of build with master fallback

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Minor branch fix

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Separate python_branch and python fallback branch

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Update repos

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Add same fallback logic as in ReadTheDocs checkouts and logs

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Changes substitution-block per code-block

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Fix refs

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Tests with read the docs env variables

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Resolving problem when building from RTD

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Apply review

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

---------

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
(cherry picked from commit 60e9c7d)

# Conflicts:
#	docs/conf.py
#	docs/fastddsgen/rpc_calculator_basic_app/includes/app.rst
#	docs/fastddsgen/rpc_calculator_basic_app/intro.rst
#	docs/fastddsgen/rpc_calculator_feed_app/includes/app.rst
#	docs/fastddsgen/rpc_calculator_feed_app/intro.rst
#	docs/fastddsgen/usage/usage.rst
#	docs/installation/configuration/cmake_options.rst
mergify bot pushed a commit that referenced this pull request Apr 6, 2026
* Add first version of build with master fallback

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Minor branch fix

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Separate python_branch and python fallback branch

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Update repos

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Add same fallback logic as in ReadTheDocs checkouts and logs

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Changes substitution-block per code-block

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Fix refs

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Tests with read the docs env variables

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Resolving problem when building from RTD

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

* Apply review

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>

---------

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
(cherry picked from commit 60e9c7d)

# Conflicts:
#	docs/conf.py
#	docs/fastdds/discovery/discovery_server.rst
#	docs/fastdds/discovery/static.rst
#	docs/fastdds/getting_started/simple_app/includes/sum_and_next_steps.rst
#	docs/fastdds/getting_started/simple_python_app/includes/sum_and_next_steps.rst
#	docs/fastdds/rtps_layer/rtps_layer.rst
#	docs/fastdds/security/access_control_plugin/access_control_plugin.rst
#	docs/fastdds/transport/shared_memory/shared_memory.rst
#	docs/fastdds/transport/tcp/tcp.rst
#	docs/fastdds/use_cases/request_reply/request_reply.rst
#	docs/fastdds/use_cases/statistics_module/statistics_module.rst
#	docs/fastdds/use_cases/well_known_deployments/well_known_deployments.rst
#	docs/fastdds/use_cases/zero_copy/zero_copy.rst
#	docs/fastdds/xml_configuration/making_xml_profiles.rst
#	docs/fastddsgen/pubsub_app/includes/sum_and_next_steps.rst
#	docs/fastddsgen/rpc_calculator_basic_app/includes/app.rst
#	docs/fastddsgen/rpc_calculator_basic_app/intro.rst
#	docs/fastddsgen/rpc_calculator_feed_app/includes/app.rst
#	docs/fastddsgen/rpc_calculator_feed_app/intro.rst
#	docs/fastddsgen/usage/usage.rst
#	docs/installation/configuration/cmake_options.rst
#	docs/installation/sources/sources_linux.rst
#	docs/installation/sources/sources_mac.rst
#	docs/installation/sources/sources_windows.rst
#	docs/notes/migration_guide.rst
#	docs/notes/previous_versions/v3.0.0.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants