Skip to content

Conversation

@GajicAleksandra
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.33%. Comparing base (f45d418) to head (a621509).
⚠️ Report is 172 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #350       +/-   ##
===========================================
+ Coverage   50.38%   68.33%   +17.95%     
===========================================
  Files         277      437      +160     
  Lines        3688     6779     +3091     
  Branches        0      559      +559     
===========================================
+ Hits         1858     4632     +2774     
- Misses       1830     2098      +268     
- Partials        0       49       +49     

☔ 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 linked an issue Oct 28, 2025 that may be closed by this pull request
@andrii-bodnar andrii-bodnar changed the title feat(api): add support for new File References API (#347) feat(sourceFiles): add support for new File References API Oct 28, 2025
@andrii-bodnar andrii-bodnar requested a review from Copilot October 28, 2025 15:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces support for the File References API in the Crowdin SDK, enabling management of asset references attached to source files.

  • Adds four new API methods: list, add, get, and delete asset references
  • Introduces AssetReference and AddAssetReferenceRequest model classes
  • Includes comprehensive unit tests with mocked API responses

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/Crowdin.Api/SourceFiles/SourceFilesApiExecutor.cs Implements four asset reference API methods with helper URL formatters
src/Crowdin.Api/SourceFiles/ISourceFilesApiExecutor.cs Adds interface definitions for the new asset reference operations
src/Crowdin.Api/SourceFiles/AssetReference.cs Defines the AssetReference model with properties like Id, Name, Url, User, CreatedAt, and MimeType
src/Crowdin.Api/SourceFiles/AddAssetReferenceRequest.cs Defines the request model for adding asset references with StorageId and Name properties
tests/Crowdin.Api.UnitTesting/Tests/SourceFiles/AssetReferenceTests.cs Provides unit tests for all four asset reference operations including success and failure scenarios
tests/Crowdin.Api.UnitTesting/Resources/SourceFiles.resx Adds mock JSON responses for list, add, and get asset reference operations
Files not reviewed (1)
  • tests/Crowdin.Api.UnitTesting/Resources/SourceFiles.Designer.cs: Language not supported

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

/// Add asset reference. Documentation:
/// <a href="https://support.crowdin.com/api/v2/#operation/api.projects.files.references.post">Crowdin API</a>
/// <a href="https://support.crowdin.com/enterprise/api/#operation/api.projects.files.references.post">Crowdin Enterprise API</a>
/// </summary>
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Missing [PublicAPI] attribute for consistency with other public methods in this class like ListAssetReferences.

Suggested change
/// </summary>
/// </summary>
[PublicAPI]

Copilot uses AI. Check for mistakes.
/// Get asset reference. Documentation:
/// <a href="https://support.crowdin.com/api/v2/#operation/api.projects.files.references.get">Crowdin API</a>
/// <a href="https://support.crowdin.com/enterprise/api/#operation/api.projects.files.references.get">Crowdin Enterprise API</a>
/// </summary>
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Missing [PublicAPI] attribute for consistency with other public methods in this class like ListAssetReferences.

Suggested change
/// </summary>
/// </summary>
[PublicAPI]

Copilot uses AI. Check for mistakes.
/// Delete asset reference. Documentation:
/// <a href="https://support.crowdin.com/api/v2/#operation/api.projects.files.references.delete">Crowdin API</a>
/// <a href="https://support.crowdin.com/enterprise/api/#operation/api.projects.files.references.delete">Crowdin Enterprise API</a>
/// </summary>
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Missing [PublicAPI] attribute for consistency with other public methods in this class like ListAssetReferences.

Suggested change
/// </summary>
/// </summary>
[PublicAPI]

Copilot uses AI. Check for mistakes.
Copy link
Member

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

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

@GajicAleksandra thank you!

@andrii-bodnar andrii-bodnar merged commit db34625 into crowdin:main Oct 28, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for new File References API

2 participants