octokit.net icon indicating copy to clipboard operation
octokit.net copied to clipboard

Cannot get Readme size via octokit.net

Open qweeah opened this issue 5 years ago • 2 comments

Need to access the size of README.md file, only to find that it's not a public property of Readme object.

The property itself is indeed available in native Github API. Better to have it in octokit.net.

qweeah avatar Jul 30 '20 08:07 qweeah

I think this should be resolved by:

  • Adding Size as a property on Octokit/Models/Response/ReadmeResponse.cs
  • Adding Size as a property on Octokit/Models/Response/Readme.cs and assigning that from the response

Marking this as up-for-grabs as it's an ideal small contribution

shiftkey avatar Feb 25 '21 19:02 shiftkey

I worked with Octokit library in the past and wanted to contribute. This is my first open-source contribution. I have added the Size fields to the Readme.cs & ReadmeResponse.cs. Modified the test cases to include the new parameter. I tested it locally. Quick question on adding new fields to a class (and constructor). I added the Size field after the Name field based on the actual API response format. Is that the correct practice to add a new field or any new fields should be added at the last? Thank you so much!

littlemisslilycane avatar Apr 22 '21 05:04 littlemisslilycane

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

github-actions[bot] avatar Jul 26 '23 01:07 github-actions[bot]