From 758f56ab51bfb74583e3eff6778f006ba6d5d2ff Mon Sep 17 00:00:00 2001 From: Edward Buckle Date: Wed, 10 Jun 2020 14:42:19 +0100 Subject: [PATCH 1/2] Add username field to secure repos Signed-off-by: Edward Buckle --- src/pfe/portal/modules/Templates.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pfe/portal/modules/Templates.js b/src/pfe/portal/modules/Templates.js index 0a5c47c0a..3bdd04102 100644 --- a/src/pfe/portal/modules/Templates.js +++ b/src/pfe/portal/modules/Templates.js @@ -324,6 +324,9 @@ async function constructRepositoryObject(url, description, name, isRepoProtected if (isRepoProtected !== undefined) { repository.protected = isRepoProtected; } + if (gitCredentials && gitCredentials.username) { + repository.authentication = { username: gitCredentials.username }; + } return repository; } From ecdc59e4c43cc95cbec02a88af40b32552001193 Mon Sep 17 00:00:00 2001 From: Edward Buckle Date: Wed, 10 Jun 2020 16:48:54 +0100 Subject: [PATCH 2/2] Open API update Signed-off-by: Edward Buckle --- docs/openapi.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/openapi.yml b/docs/openapi.yml index c0329118d..7df38004e 100644 --- a/docs/openapi.yml +++ b/docs/openapi.yml @@ -2193,6 +2193,14 @@ components: type: boolean protected: type: boolean + authentication: + type: object + properties: + username: + description: user's github username + type: string + example: 'user' + TemplateRepoSetting: type: object required: