Skip to content

fix: Always include SHA in get_file_contents responses (#595) #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

yonaka15
Copy link
Owner

@yonaka15 yonaka15 commented Jul 12, 2025

Switch from GitHub Raw Content API to Contents API for file retrieval. This ensures SHA information is always included in the response, providing consistency across file and directory operations.

Changes:

  • Replace rawClient.GetRawContent() with client.Repositories.GetContents()
  • Return JSON marshaled RepositoryContent instead of resource contents
  • Update tests to verify SHA presence in responses
  • Remove unused imports (base64, net/url)

Closes github#595

yonaka15 added 2 commits July 12, 2025 23:20
Switch from GitHub Raw Content API to Contents API for file retrieval.
This ensures SHA information is always included in the response, providing
consistency across file and directory operations.

Changes:
- Replace rawClient.GetRawContent() with client.Repositories.GetContents()
- Return JSON marshaled RepositoryContent instead of resource contents
- Update tests to verify SHA presence in responses
- Remove unused imports (base64, net/url)

Closes github#605
The getRawClient parameter is no longer used after switching from
Raw Content API to Contents API. Mark it with underscore to satisfy
golangci-lint while maintaining API compatibility.

Part of github#605
@yonaka15 yonaka15 changed the title fix: Always include SHA in get_file_contents responses (#605) fix: Always include SHA in get_file_contents responses (#595) Jul 12, 2025
@yonaka15 yonaka15 closed this Jul 12, 2025
@yonaka15 yonaka15 deleted the fix/get-file-contents-include-sh branch July 12, 2025 15:48
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.

Tool get_file_contents is missing the required sha in its response
1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy