1
0
Fork 0

Forgejo: fix tag parsing

pull/12307/head
Stephan Vock 2025-02-10 19:24:28 +00:00
parent cad36a0fbd
commit 54fe4d3dd3
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ class ForgejoDriver extends VcsDriver
$response = $this->getContents($resource);
$tagsData = $response->decodeJson();
foreach ($tagsData as $tag) {
$tags[$tag['tag_name']] = $tag['commit']['sha'];
$tags[$tag['name']] = $tag['commit']['sha'];
}
$resource = $this->getNextPage($response);

View File

@ -130,7 +130,7 @@ class ForgejoDriverTest extends TestCase
'clone_url' => 'https://codeberg.org/acme/repo.git'
])],
['url' => 'https://codeberg.org/api/v1/repos/acme/repo/tags?per_page=100', 'body' => (string) json_encode([
['tag_name' => '1.0', 'commit' => ['sha' => 'SOMESHA']]
['name' => '1.0', 'commit' => ['sha' => 'SOMESHA']]
])]
],
true