Skip to content

feat(source_files): add new endpoints for Asset References management#119

Closed
GauravJangra9988 wants to merge 8 commits intocrowdin:mainfrom
GauravJangra9988:new-endpoints-add
Closed

feat(source_files): add new endpoints for Asset References management#119
GauravJangra9988 wants to merge 8 commits intocrowdin:mainfrom
GauravJangra9988:new-endpoints-add

Conversation

@GauravJangra9988
Copy link

fixes #118

@GauravJangra9988 GauravJangra9988 changed the title New endpoints add feat: New endpoints add Oct 28, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.68%. Comparing base (0198054) to head (1b936fe).

Files with missing lines Patch % Lines
crowdin/source_files.go 0.00% 18 Missing ⚠️
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.
📢 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.

@GauravJangra9988
Copy link
Author

@andrii-bodnar hey, i am getting linting problem can you help.

@andrii-bodnar
Copy link
Member

@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.

@andrii-bodnar andrii-bodnar changed the title feat: New endpoints add feat(source_files): add new endpoints for Asset References management Oct 28, 2025
@andrii-bodnar andrii-bodnar requested a review from Copilot October 28, 2025 15:23
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 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 SourceFilesService for 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.

@andrii-bodnar andrii-bodnar requested a review from Copilot October 28, 2025 16:01
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

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.

@GauravJangra9988
Copy link
Author

GauravJangra9988 commented Oct 29, 2025

@andrii-bodnar hey,i dont know where its failing i tried many changes

is there any way to find lint problem in local development

@andrii-bodnar
Copy link
Member

Hi @GauravJangra9988, you can try to run the linter locally by using this command: golangci-lint run

@andrii-bodnar
Copy link
Member

@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"`
}

@GauravJangra9988
Copy link
Author

Creating new pull request with only specific changes

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 support for new File References API

4 participants