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: 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; }