Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1099-Gitlab-integration-should-manage-non-default-port #1101

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*Iceberg-Pharo6
sshPort
"In pharo 6 we do not have the code to be able to load gitlab with non default ssh port projects. So we return nil so that #scpUrl does not break."

^ nil

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
running
testScpUrlForSelfHostedGitlabWithNonDefaultSSHPort
| repository |
SystemVersion current major <= 6 ifTrue: [ self skip ].

repository := MCGitlabRepository location: 'gitlab://git.pharo.org:1234:pharo-project/pharo'.
self assert: repository scpUrl equals: 'ssh://[email protected]:1234/pharo-project/pharo.git'
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
*Iceberg
scpUrl
^ 'git@<1s>:<2s>.git' expandMacrosWith: self hostname with: projectPath
"If the sshPort is not nil it means that we have a non default ssh port. Thus we need to add `ssh://` and th port number to the scheme"

^ self sshPort
ifNil: [ 'git@<1s>:<2s>.git' expandMacrosWith: self hostname with: projectPath ]
ifNotNil: [ :port | 'ssh://git@<1s>:<2s>/<3s>.git' expandMacrosWith: self hostname with: port with: projectPath ]