Skip to content

Commit 07f65af

Browse files
authored
Merge pull request #69 from intersystems-community/revert-67-private-repo-support
Revert "Private repo support"
2 parents ce48a08 + 995ee6c commit 07f65af

File tree

2 files changed

+2
-43
lines changed

2 files changed

+2
-43
lines changed

src/cls/ZPM/Package.cls

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,6 @@ ClassMethod GetDefaultBranch(path As %String) As %String
347347
Set ht = ##class(%Net.HttpRequest).%New()
348348
Set ht.Server = "api.github.com"
349349
Set ht.SSLConfiguration = ##class(ZPM.Utils).GetSSLConfiguration()
350-
Set settings = ##class(ZPM.Settings).%Get()
351-
Set ht.Username = settings.BasicAuthUsername
352-
Set ht.Password = settings.BasicAuthAccessToken
353350
Set ht.Https = 1
354351
Set ht.Location = "/repos"_path
355352
$$$ThrowOnError(ht.Get())
@@ -373,9 +370,6 @@ ClassMethod DownloadPackageFromGitHub(url As %String, Output branch As %String)
373370
If $data(tComponents("port"), port), port'="" {
374371
Set ht.Port = port
375372
}
376-
Set settings = ##class(ZPM.Settings).%Get()
377-
Set ht.Username = settings.BasicAuthUsername
378-
Set ht.Password = settings.BasicAuthAccessToken
379373
Set ht.Location = tComponents("path")_"archive/"_branch_".tar.gz"
380374
$$$ThrowOnError(ht.Get())
381375
If (ht.HttpResponse.StatusCode'=200) {
@@ -407,12 +401,8 @@ ClassMethod GetModuleMeta(url As %String) As %DynamicObject
407401
If $data(tComponents("port"), port), port'="" {
408402
Set ht.Port = port
409403
}
410-
Set location = tComponents("path")_..GetDefaultBranch(tComponents("path"))_"/module.xml"
411-
Set settings = ##class(ZPM.Settings).%Get()
412-
If (settings.BasicAuthAccessToken '= "") {
413-
Do ht.SetHeader("Authorization","token "_settings.BasicAuthAccessToken)
414-
}
415-
$$$ThrowOnError(ht.Get(location))
404+
Set ht.Location = tComponents("path")_"master/module.xml"
405+
$$$ThrowOnError(ht.Get())
416406
If (ht.HttpResponse.StatusCode'=200) {
417407
$$$ThrowStatus($$$ERROR(5001,"Unable to download XML "_ht.Location))
418408
}

src/cls/ZPM/Settings.cls

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)