Skip to content

Commit

Permalink
Merge pull request #633 from CleverCloud/davlgd-git-ssh-url
Browse files Browse the repository at this point in the history
feat (applications): add git+ssh URL in local config data
  • Loading branch information
hsablonniere committed Jan 25, 2024
2 parents 059cbd4 + 8c702ce commit 763dbbc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/commands/applications.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ function formatApps (apps, onlyAliases, json) {
}
else {
return apps
.map((app) =>
[
.map((app) => {
const sshUrl = app.git_ssh_url ?? app.deploy_url.replace('https://', 'git+ssh://git@');
return [
`Application ${app.name}`,
` alias: ${colors.bold(app.alias)}`,
` id: ${app.app_id}`,
` deployment url: ${app.deploy_url}`].join('\n'),
)
` ID: ${app.app_id}`,
` deployment URL: ${app.deploy_url}`,
` git+ssh URL: ${sshUrl}`,
].join('\n');
})
.join('\n\n');
}
}
Expand Down
1 change: 1 addition & 0 deletions src/models/app_configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ async function addLinkedApplication (appData, alias, ignoreParentConfig) {
app_id: appData.id,
org_id: appData.ownerId,
deploy_url: appData.deployment.httpUrl || appData.deployment.url,
git_ssh_url: appData.deployment.url,
name: appData.name,
alias: alias || slugify(appData.name),
};
Expand Down

0 comments on commit 763dbbc

Please sign in to comment.