Skip to content

feat: add string-based API support#269

Merged
andrii-bodnar merged 3 commits into
masterfrom
feature/issue-171_string-based-api-support
Jun 8, 2026
Merged

feat: add string-based API support#269
andrii-bodnar merged 3 commits into
masterfrom
feature/issue-171_string-based-api-support

Conversation

@innomaxx

@innomaxx innomaxx commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Closes #171

@innomaxx innomaxx requested a review from andrii-bodnar June 2, 2026 13:48
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.93750% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.12%. Comparing base (f3bca05) to head (da8a8a2).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/CrowdinApiClient/Model/BranchMerge.php 69.24% 8 Missing ⚠️
src/CrowdinApiClient/Model/BranchClone.php 76.93% 6 Missing ⚠️
src/CrowdinApiClient/Model/StringUpload.php 84.62% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #269      +/-   ##
============================================
- Coverage     93.30%   93.12%   -0.18%     
- Complexity     1840     1884      +44     
============================================
  Files           169      173       +4     
  Lines          4969     5097     +128     
============================================
+ Hits           4636     4746     +110     
- Misses          333      351      +18     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial support for Crowdin string-based projects by extending the PHP client with several string-based-only endpoints (and corresponding models/tests), plus clarifying documentation around parameter differences between file-based vs string-based projects.

Changes:

  • Added Source Strings upload endpoints (uploadStrings, checkUploadStatus) and a StringUpload model with tests.
  • Added Branch clone/merge endpoints (clone, status, get cloned branch, merge, merge status, merge summary) with new models and tests.
  • Added Bundle “list branches” endpoint for string-based projects, updated Branch model to expose isProtected, and adjusted PHPDoc for string-based parameter variants.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/CrowdinApiClient/Api/SourceStringApiTest.php Adds tests for string upload endpoints and response mapping.
tests/CrowdinApiClient/Api/BundleApiTest.php Adds test coverage for listing bundle branches (string-based).
tests/CrowdinApiClient/Api/BranchApiTest.php Adds tests for branch clone/merge async workflows and merge summary.
src/CrowdinApiClient/Model/StringUpload.php Introduces model representing async string upload state.
src/CrowdinApiClient/Model/BranchMergeSummary.php Introduces model representing merge summary details.
src/CrowdinApiClient/Model/BranchMerge.php Introduces model representing async branch merge state.
src/CrowdinApiClient/Model/BranchClone.php Introduces model representing async branch clone state.
src/CrowdinApiClient/Model/Branch.php Adds isProtected field accessor for string-based branches.
src/CrowdinApiClient/Api/TranslationApi.php Updates PHPDoc to reflect string-based vs file-based parameter differences.
src/CrowdinApiClient/Api/SourceStringApi.php Adds upload endpoints and updates create PHPDoc for branchId vs fileId.
src/CrowdinApiClient/Api/DistributionApi.php Updates PHPDoc for exportMode and bundleIds for string-based projects.
src/CrowdinApiClient/Api/BundleApi.php Adds listBranches endpoint for bundles in string-based projects.
src/CrowdinApiClient/Api/BranchApi.php Adds string-based clone/merge endpoints and updates create PHPDoc.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/CrowdinApiClient/Api/SourceStringApi.php Outdated
Comment thread src/CrowdinApiClient/Model/StringUpload.php Outdated
Comment thread src/CrowdinApiClient/Model/BranchClone.php Outdated
Comment thread src/CrowdinApiClient/Model/BranchMerge.php Outdated
@innomaxx

innomaxx commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator Author

@andrii-bodnar please review and merge

@andrii-bodnar andrii-bodnar merged commit 110fb34 into master Jun 8, 2026
8 checks passed
@andrii-bodnar andrii-bodnar deleted the feature/issue-171_string-based-api-support branch June 8, 2026 07:19
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.

String-based API support

3 participants