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 #3148 from ebuckle/3101
Browse files Browse the repository at this point in the history
Empty Auth with personal access token
  • Loading branch information
hhellyer authored Jun 16, 2020
2 parents cea82ff + fed1b8f commit a7abfe8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pfe/portal/modules/Templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,12 @@ async function constructRepositoryObject(url, description, name, isRepoProtected
if (isRepoProtected !== undefined) {
repository.protected = isRepoProtected;
}
if (gitCredentials && gitCredentials.username) {
repository.authentication = { username: gitCredentials.username };
if (gitCredentials) {
if (gitCredentials.username) {
repository.authentication = { username: gitCredentials.username };
} else if (gitCredentials.personalAccessToken) {
repository.authentication = {};
}
}
return repository;
}
Expand Down

0 comments on commit a7abfe8

Please sign in to comment.