Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3116 from ebuckle/3101
Browse files Browse the repository at this point in the history
Add username field to secure repos
  • Loading branch information
hhellyer authored Jun 15, 2020
2 parents f6eab8b + ecdc59e commit 6935e02
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions src/pfe/portal/modules/Templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6935e02

Please sign in to comment.