From e3585f52212f0d0d951504d127cb0f5ae26c1c8d Mon Sep 17 00:00:00 2001 From: Simon Stamm Date: Wed, 15 Sep 2021 11:45:00 +0200 Subject: [PATCH] Change hardcoded master to $defaultBranch Since we pass over the defaultBranch argument in our templates, this seems to break because of the hardcoded master values. Probably this affects other providers as well. Signed-off-by: Simon Stamm --- .../src/scaffolder/actions/builtin/publish/gitlab.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts index eead310777..5941f52746 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts @@ -127,7 +127,7 @@ export function createPublishGitlabAction(options: { }); const remoteUrl = (http_url_to_repo as string).replace(/\.git$/, ''); - const repoContentsUrl = `${remoteUrl}/-/blob/master`; + const repoContentsUrl = `${remoteUrl}/-/blob/${defaultBranch}`; const gitAuthorInfo = { name: config.getOptionalString('scaffolder.defaultAuthor.name'),