Skip to content

Remove omitempty from Content field of RepositoryContentFileOptions - #2430

Merged
gmlewis merged 1 commit into
google:masterfrom
Ashvin-Ranjan:fix_repo_content
Aug 2, 2022
Merged

Remove omitempty from Content field of RepositoryContentFileOptions#2430
gmlewis merged 1 commit into
google:masterfrom
Ashvin-Ranjan:fix_repo_content

Conversation

@Ashvin-Ranjan

Copy link
Copy Markdown
Contributor

fixes#2427

This removes omitempty from RepositoryContentFileOptions.Content so that an empty content field can be passed in to generate empty files. Before, the content field was omitted, which caused the GitHub API to not accept the request as the field is required, even if it is empty.

@google-cla

google-claBot commented Aug 2, 2022

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@codecov

codecovBot commented Aug 2, 2022

Copy link
Copy Markdown

Codecov Report

Merging #2430 (5498f4f) into master (3a432d6) will not change coverage.
The diff coverage is n/a.

@@ Coverage Diff @@## master #2430 +/- ##
=======================================
Coverage 98.06% 98.06% =======================================
Files 120 120 Lines 10558 10558 =======================================
Hits 10354 10354 Misses 140 140 Partials 64 64 
Impacted FilesCoverage Δ
github/repos_contents.go89.33% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@gmlewisgmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @Ashvin-Ranjan !
LGTM.
Merging.

@gmlewis
gmlewis merged commit aff6c4b into google:masterAug 2, 2022
jlaportebot added a commit to jlaportebot/go-github that referenced this pull request Jun 28, 2026
Sign up for freeto 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.

Unable to create empty file

3 participants

@Ashvin-Ranjan@gmlewis@ashvinranjan-outreach