[Fleet] Override branch in doc links (#119514) (#119561)

Co-authored-by: Jen Huang <its.jenetic@gmail.com>

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Jen Huang <its.jenetic@gmail.com>
This commit is contained in:
Kibana Machine 2021-11-24 00:41:28 -05:00 committed by GitHub
parent daa4ee3715
commit 53315b285f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -151,7 +151,11 @@ export function registerLanguageClients(
description: integration.description,
type: 'ui_link',
shipper: 'language_clients',
uiInternalPath: integration.docUrlTemplate.replace('{branch}', branch),
// Documentation for `main` branches is still published at a `master` URL.
uiInternalPath: integration.docUrlTemplate.replace(
'{branch}',
branch === 'main' ? 'master' : branch
),
isBeta: false,
icons,
categories: ['elastic_stack', 'custom', 'language_client'],