From ca2191b3b26f723f4900c7db793b431d88298cfd Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Tue, 23 Nov 2021 18:38:42 -0800 Subject: [PATCH] [Fleet] Override branch in doc links (#119514) Co-authored-by: Jen Huang --- .../custom_integrations/server/language_clients/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/custom_integrations/server/language_clients/index.ts b/src/plugins/custom_integrations/server/language_clients/index.ts index 0ce45dbcfcd878..d18eddaf086279 100644 --- a/src/plugins/custom_integrations/server/language_clients/index.ts +++ b/src/plugins/custom_integrations/server/language_clients/index.ts @@ -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'],