Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 13, 2025

Implements support for the three new batch operation endpoints released in Crowdin API v2.

Changes

StringCommentApi

  • Added batchOperations() for batch PATCH operations on comments

StringTranslationApi

  • Added approvalsBatchOperations() for batch PATCH operations on approvals
  • Added translationsBatchOperations() for batch PATCH operations on translations

All methods follow the existing pattern from SourceStringApi.batchOperations() and accept JSON Patch operations (RFC 6901):

$crowdin->stringComment->batchOperations(1, [
    [
        'op' => 'replace',
        'path' => '/2/text',
        'value' => 'Updated comment text'
    ],
    [
        'op' => 'replace',
        'path' => '/2/issueStatus',
        'value' => 'resolved'
    ]
]);

API Documentation

> [!WARNING]
>
>

Original prompt

Implement issue ##227


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…nslations

Co-authored-by: andrii-bodnar <29282228+andrii-bodnar@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement issue 227 Add batch operation endpoints for String Comments, Approvals, and Translations Nov 13, 2025
Copilot AI requested a review from andrii-bodnar November 13, 2025 15:31
@andrii-bodnar andrii-bodnar changed the title Add batch operation endpoints for String Comments, Approvals, and Translations feat: add batch operation endpoints for String Comments, Approvals, and Translations Nov 13, 2025
@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.01%. Comparing base (e65220d) to head (ea32305).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #242      +/-   ##
============================================
+ Coverage     91.97%   92.01%   +0.05%     
- Complexity     1554     1557       +3     
============================================
  Files           146      146              
  Lines          4180     4167      -13     
============================================
- Hits           3844     3834      -10     
+ Misses          336      333       -3     

☔ View full report in Codecov by Sentry.
📢 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.

@andrii-bodnar andrii-bodnar marked this pull request as ready for review November 13, 2025 15:34
@andrii-bodnar
Copy link
Member

@copilot address the comments above

Co-authored-by: andrii-bodnar <29282228+andrii-bodnar@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 13, 2025

@copilot address the comments above

Done. Renamed methods to approvalsBatchOperations and translationsBatchOperations in commit ea32305.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/c0daa33cb2533cd73f48dde1c70c2afa3e7953b5
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/console/zipball/4b4d8cd118484aa604ec519062113dd87abde18c
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/event-dispatcher/zipball/e3bca343efeb613f843c254e7718ef17c9bdf7a3
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/process/zipball/01906871cb9b5e3cf872863b91aba4ec9767daf4
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/stopwatch/zipball/f83692cd869a6f2391691d40a01e8acb89e76fee
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/string/zipball/e3f98bfc7885c957488f443df82d97814a3ce061
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/xJl1c4 /usr/bin/composer install --no-interaction (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@andrii-bodnar andrii-bodnar merged commit a07c267 into master Nov 13, 2025
15 checks passed
@andrii-bodnar andrii-bodnar linked an issue Nov 13, 2025 that may be closed by this pull request
@andrii-bodnar andrii-bodnar deleted the copilot/implement-issue-227 branch November 13, 2025 15:45
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.

Add new endpoints for batch operations

2 participants