Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Updatecreate_or_update_file SHA Arg Description#651

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
LuluBeatson merged 3 commits intomainfromlulu/file-sha
Jul 8, 2025

Conversation

LuluBeatson
Copy link
Contributor

@LuluBeatsonLuluBeatson commentedJul 8, 2025
edited
Loading

Clarifies thatsha is required if updating an existing file.

Required if updating an existing file. The blob SHA of the file being replaced.

Fixes agent trying to update a file without providing the blob SHA.

New description is also more aligned to the API docs for this parameter
https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#create-or-update-file-contents

Relates to#605 because we would like to allow the agent get thee blob SHA usingget_file_contents tool

cc@audreee

ref:https://github.com/github/copilot-productivity/issues/6450

@LuluBeatsonLuluBeatson marked this pull request as ready for reviewJuly 8, 2025 11:35
@CopilotCopilotAI review requested due to automatic review settingsJuly 8, 2025 11:35
@LuluBeatsonLuluBeatson requested a review froma team as acode ownerJuly 8, 2025 11:35
Copy link
Contributor

@CopilotCopilotAI 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 clarifies the documentation for thesha parameter in thecreate_or_update_file function to make it explicit that the SHA is required when updating existing files. The updated description aligns with GitHub's REST API documentation and helps prevent errors where agents attempt to update files without providing the necessary blob SHA.

  • Updates parameter description to explicitly state SHA requirement for file updates
  • Aligns documentation with GitHub's official REST API specification
  • Updates both code documentation and README to maintain consistency

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

FileDescription
pkg/github/repositories.goUpdates the SHA parameter description in the function definition
pkg/github/toolsnaps/create_or_update_file.snapUpdates the corresponding test snapshot with new description
README.mdUpdates user-facing documentation to reflect the clarified parameter description

@LuluBeatsonLuluBeatson merged commit3341e6b intomainJul 8, 2025
16 checks passed
@LuluBeatsonLuluBeatson deleted the lulu/file-sha branchJuly 8, 2025 16:51
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@tonytrgtonytrgtonytrg approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@LuluBeatson@tonytrg

[8]ページ先頭

©2009-2025 Movatter.jp