Merge pull request #10943 from pineapplehunter/master

Accept response from gitlab api with more than one entry in json
This commit is contained in:
Eelco Dolstra 2024-06-24 14:23:47 +02:00 committed by GitHub
commit bc21c54565
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -433,7 +433,7 @@ struct GitLabInputScheme : GitArchiveInputScheme
store->toRealPath(
downloadFile(store, url, "source", headers).storePath)));
if (json.is_array() && json.size() == 1 && json[0]["id"] != nullptr) {
if (json.is_array() && json.size() >= 1 && json[0]["id"] != nullptr) {
return RefInfo {
.rev = Hash::parseAny(std::string(json[0]["id"]), HashAlgorithm::SHA1)
};