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

Fix configuration of remotes #970

Merged
merged 2 commits into from
Aug 11, 2018
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,4 @@
*Iceberg-Plugin-GitHub
githubRequestUrlKey

^ #'clone_url'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "IceHttpsProtocol"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*Iceberg-Plugin-GitHub
githubRequestUrlKey

^ #'ssh_url'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "IceSSHProtocol"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
querying-github
getGitHubRepository
"It will retry 3 times"
1 to: 3 do: [ :attempt |
[ [ ^ IceGitHubAPI new
beAnonymous;
getRepository: self userName project: self projectName ]
on: IceAuthenticationError do: [ "I will retry." ] ]
on: LGitNoCredentialsProvided do: [ ^ nil ] ].
^ nil
[ ^ IceGitHubAPI new
beAnonymous;
getRepository: self userName project: self projectName ]
on: LGitNoCredentialsProvided
do: [ ^ nil ]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ newRepository
(githubRepository at: #fork)
ifTrue: [ | parent remote |
parent := githubRepository at: #parent.
remote := IceGitRemote name: ((parent at: #owner) at: #login) url: (parent at: #'ssh_url').
remote := IceGitRemote name: ((parent at: #owner) at: #login) url: (parent at: self selectedProtocol githubRequestUrlKey).
newRepository addRemote: remote.
remote fetch. ] ].
^ newRepository
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*Iceberg-Plugin-GitHub
githubRequestUrlKey
"Return the key used in github REST responses to get the URL with the correct protocol"
self subclassResponsibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "IceUrlProtocol"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
specs
title
^ 'Add local repository'
^ 'Import from existing clone'
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
accessing
newRepository
UIManager default
informUser: ('Adding repository {1}' format: { self location fullName })
informUser: ('Importing repository from {1}' format: { self location fullName })
during: [
^ IceRepositoryCreator new
repository: repository;
Expand Down
1 change: 0 additions & 1 deletion Iceberg-TipUI.package/monticello.meta/categories.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ SystemOrganization addCategory: #'Iceberg-TipUI-View-Branch'!
SystemOrganization addCategory: #'Iceberg-TipUI-View-DataSource'!
SystemOrganization addCategory: #'Iceberg-TipUI-View-RepositoryType'!
SystemOrganization addCategory: #'Iceberg-TipUI-View-Versions'!
ystemOrganization addCategory: #'Iceberg-TipUI-View-Versions'!