Skip to content

Commit

Permalink
Add host only when there is no host property
Browse files Browse the repository at this point in the history
Signed-off-by: SangKyu Kang <kang3498@hanmail.net>
  • Loading branch information
Kang3498 committed May 14, 2024
1 parent 17a391d commit 23713fe
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/integration/src/awsCodeCommit/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,17 @@ export function readAwsCodeCommitIntegrationConfigs(
// First read all the explicit integrations
const result = configs.map(readAwsCodeCommitIntegrationConfig);

// If no explicit console.aws.amazon.com integration was added, put one in the list as
// a convenience
if (!result.some(c => !c.host)) {
if (result.length === 0) {
result.push({
host: AMAZON_AWS_CODECOMMIT_HOST,
});
}

result.forEach(c => {
if (!c.hasOwnProperty('host')) {
c.host = AMAZON_AWS_CODECOMMIT_HOST;
}
});

return result;
}

0 comments on commit 23713fe

Please sign in to comment.