File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
src/GitS-Core.package/GSSelfUpdater.class Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 11requests
22getShaOfVersion: aString
33 | response json |
4- response := WebClient httpGet: (self githubApiUrlForVersion: aString).
4+ response := WebClient new
5+ httpGet: (self githubApiUrlForVersion: aString)
6+ do: [:request |
7+ | token |
8+ token := nil .
9+ (self environment classNamed: #SmalltalkCI ) ifNotNil: [:sci |
10+ token := sci getEnv: ' GITHUB_TOKEN' ].
11+ (token isEmptyOrNil and : [FileDirectory respondsTo: #getenv: ])
12+ ifTrue: [token := FileDirectory getenv: ' GITHUB_TOKEN' ].
13+ token isEmptyOrNil ifFalse:
14+ [request headerAt: ' Authorization' put: ' token ' , token]].
515 json := response content parseAsJson.
616 response code = 200 ifFalse: [
717 ^ self error: (' Error while trying to resolve git-s version {1}: {2}'
818 format: {aString printString. json at: ' message' })].
9- ^ json at: ' sha'
19+ ^ json at: ' sha'
Original file line number Diff line number Diff line change 88 "changeLog" : " mad 8/13/2025 14:18" ,
99 "checkForNewVersion" : " mad 10/25/2024 11:32" ,
1010 "fullRepositoryName" : " mad 10/9/2024 16:33" ,
11- "getShaOfVersion:" : " mad 10/24/2024 15:07 " ,
11+ "getShaOfVersion:" : " ct 10/6/2025 04:04 " ,
1212 "githubApiUrlForVersion:" : " mad 10/9/2024 18:38" ,
1313 "installScriptForInstalledVersion" : " mad 10/9/2024 16:51" ,
1414 "installScriptForVersion:" : " mad 10/9/2024 16:50" ,
You can’t perform that action at this time.
0 commit comments