Closed LinqLover closed 3 years ago
I also converted all existing "untagged" releases into prereleases:
client := WebClient new
token: githubOauthToken;
yourself.
releases := Json readFrom: (client httpGet: 'https://api.github.com/repos/hpi-swa-lab/SqueakByExample-english/releases') content readStream.
releases
select: [:release | ((release tag_name ifNil: ['']) startsWith: 'untagged-')
and: [release prerelease not]]
thenDo: [:release | self assert: (client httpPost: 'https://api.github.com/repos/hpi-swa-lab/SqueakByExample-english/releases/' , release id content: (JsonObject new at: #prerelease put: true; asJsonString) type: 'application/vnd.github.v3+json' do: [:req | req headerAt: 'Authorization' put: 'token ', client token]) isSuccess]
🤓