Merge pull request #434 from iflytek/worktree-fix-promotion-download

fix(promotion): copy bundleReady and downloadReady when promoting skill to global
This commit is contained in:
dongmucat 2026-05-14 15:50:06 +08:00 committed by GitHub
commit 356e507cf9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -234,6 +234,8 @@ public class PromotionService {
newVersion.setManifestJson(sourceVersion.getManifestJson());
newVersion.setFileCount(sourceVersion.getFileCount());
newVersion.setTotalSize(sourceVersion.getTotalSize());
newVersion.setBundleReady(sourceVersion.isBundleReady());
newVersion.setDownloadReady(sourceVersion.isDownloadReady());
newVersion = skillVersionRepository.save(newVersion);
// Update skill's latest version

View file

@ -91,6 +91,8 @@ class PromotionServiceTest {
sv.setManifestJson("{\"version\":\"1.0.0\"}");
sv.setFileCount(3);
sv.setTotalSize(1024L);
sv.setBundleReady(true);
sv.setDownloadReady(true);
return sv;
}
@ -466,6 +468,8 @@ class PromotionServiceTest {
assertEquals(3, newVersion.getFileCount());
assertEquals(1024L, newVersion.getTotalSize());
assertEquals(Instant.now(CLOCK), newVersion.getPublishedAt());
assertTrue(newVersion.isBundleReady());
assertTrue(newVersion.isDownloadReady());
// Verify files copied
@SuppressWarnings("unchecked")