Skip to content

feat(game-center): create achievements and leaderboards over REST - #35

Merged
hanrw merged 3 commits into
mainfrom
improve/game-center-create-rest
Oct 11, 2026
Merged

hanrw merged 3 commits into
mainfrom
improve/game-center-create-rest

Conversation

@hanrw

@hanrw hanrw commented Oct 10, 2026

Copy link
Copy Markdown
Member

Why

Game Center was moved onto REST in #32, but creating achievements and leaderboards was still CLI-only.

What changed

  • POST /api/v1/game-center/details/:detailId/achievements: body keys are the camelCase of the create flags (referenceName, vendorIdentifier, points, showBeforeEarned, repeatable).
  • POST /api/v1/game-center/details/:detailId/leaderboards: referenceName, vendorIdentifier, scoreSortType, and submissionType (defaults to BEST_SCORE).
  • A missing required field or an unknown value returns 400.

How it was verified

  • 7 state-based tests run against a repository that echoes what it was sent: every field set, only required fields set, and three refusals. Red came first: the controller functions didn't exist.
  • swift test passes.

Checklist

  • A failing test came first; swift test passes
  • A command that returns data is also served by asc web-server
  • User-visible change: one line under ## [Unreleased] in CHANGELOG.md
  • make docs && make check-docs passes
  • No API key, .p8, issuer ID or Apple ID session in the diff, output or screenshots

🤖 Generated with Claude Code

POST /api/v1/game-center/details/:detailId/achievements and
/leaderboards accept the create flags in camelCase and return 400 when a
required field is missing or an enum value is unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 31 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d7e16fac-0e33-4def-9cb4-74a88e3a25d8

📥 Commits

Reviewing files that changed from the base of the PR and between 6fb5ffb and 1424dbe.


📒 Files selected for processing (8)
  • CHANGELOG.md
  • Sources/ASCCommand/Commands/Web/Controllers/GameCenterController.swift
  • Sources/Infrastructure/Apps/AssetLibrary/Images/SDKLibraryImageRepository.swift
  • Sources/Infrastructure/Apps/AssetLibrary/Placements/SDKAssetPlacementRepository.swift
  • Sources/Infrastructure/Apps/AssetLibrary/Videos/SDKLibraryVideoRepository.swift
  • Sources/Infrastructure/Shared/SDKFilter.swift
  • Tests/ASCCommandTests/Commands/Web/GameCenterControllerTests.swift
  • docs/features/game-center/README.md

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

hanrw and others added 2 commits October 11, 2026 10:56
CI and release builds use Swift 6.2.4, which can't infer `.init(rawValue:)`
inside `value.flatMap { .init(…) }.map { [$0] }` (Swift 6.4 can), so main
has failed to build on CI since #32. Route the eight filter parameters
through a generic `sdkFilter(_:)` whose SDK type comes from the parameter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.54%. Comparing base (79d213a) to head (1424dbe).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
...brary/Placements/SDKAssetPlacementRepository.swift 50.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
+ Coverage   82.04%   82.54%   +0.49%     
==========================================
  Files         492      518      +26     
  Lines       14362    15649    +1287     
==========================================
+ Hits        11784    12918    +1134     
- Misses       2578     2731     +153     
Files with missing lines Coverage Δ
...ssetLibrary/Images/SDKLibraryImageRepository.swift 97.50% <100.00%> (ø)
...ssetLibrary/Videos/SDKLibraryVideoRepository.swift 98.66% <100.00%> (ø)
Sources/Infrastructure/Shared/SDKFilter.swift 100.00% <100.00%> (ø)
...brary/Placements/SDKAssetPlacementRepository.swift 91.53% <50.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hanrw
hanrw merged commit 600c1c6 into main Oct 11, 2026
5 checks passed
@hanrw
hanrw deleted the improve/game-center-create-rest branch October 11, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant