feat(source_files): add new endpoints for Asset References management#119
feat(source_files): add new endpoints for Asset References management#119GauravJangra9988 wants to merge 8 commits intocrowdin:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #119 +/- ##
==========================================
- Coverage 98.21% 97.68% -0.53%
==========================================
Files 68 68
Lines 3296 3314 +18
==========================================
Hits 3237 3237
- Misses 33 51 +18
Partials 26 26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@andrii-bodnar hey, i am getting linting problem can you help. |
|
@GauravJangra9988 it added comments to exact lines which contain the lint problem: https://github.com/crowdin/crowdin-api-client-go/pull/119/files Please review your changes and make sure they follow the project's code style. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Asset References management in source files by implementing four new API endpoints: listing, adding, retrieving, and deleting asset references.
Key Changes:
- Added four new methods to
SourceFilesServicefor managing asset references - Introduced data models for asset references including
AssetReference,UserInfo, and related request/response structures
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| crowdin/source_files.go | Implements four new methods for asset reference operations (list, add, get, delete) |
| crowdin/model/source_files.go | Defines data structures for asset references including request/response models |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@andrii-bodnar hey,i dont know where its failing i tried many changes is there any way to find lint problem in local development |
|
Hi @GauravJangra9988, you can try to run the linter locally by using this command: |
|
@GauravJangra9988 I suppose it's due to the formatting of the new structures. Each property should be indented to align with one vertical line. For example: // AddAssetReferenceRequest describes a request to add a reference file for an asset.
type AddAssetReferenceRequest struct {
StorageID int `json:"storageId"`
Name string `json:"name"`
}
// UserInfo represents user information received in a response.
type UserInfo struct {
UserID int `json:"id"`
UserName string `json:"username"`
FullName string `json:"fullName"`
AvatarURL string `json:"avatarUrl"`
}
// AssetReference represents an asset reference.
type AssetReference struct {
ID int `json:"id"`
Name string `json:"name"`
URL string `json:"url"`
User UserInfo `json:"user"`
CreatedAt string `json:"createdAt"`
MimeType string `json:"mimeType"`
} |
|
Creating new pull request with only specific changes |
fixes #118