docs: Extend CONTRIBUTING.md with code guidelines#4299
Conversation
Add detailed code style and documentation guidelines including: - Method documentation conventions with godoc examples - API endpoint documentation patterns - Error handling guidelines - Type naming and struct conventions - Testing requirements and patterns Co-authored-by: review feedback from google/go-github maintainers
- Fix ID fields section: clarify required vs optional in both request and response bodies, with examples for both - Replace bold script/ formatting with list items (reduce LLM-like formatting) - Fix NodeID example: use non-pointer string since NodeID is typically required in response schemas - Fix Request body example: use CreateSelfHostedRunnerGroupRequest with proper required/optional field distinction - Make NodeID consistent across all examples (Code Comments section)
|
@jlaportebot Why was the previous PR #4202 closed? It has a lot of useful comments. |
So I'm of the opinion (derived from empirical evidence) that most contributors do not bother to read CONTRIBUTING.md, unfortunately. I'm also of the opinion that one of the reasons might be "TL;DR" (it is too enormous). I understand the arguments about making it super detailed, accounting for as many scenarios as possible that a contributor might encounter while writing a PR so that an AI Agent can slurp it all in and do a better job, but at the same time I don't want to drive away humans from contributing just because it appears to be a daunting experience before they even get started. Therefore, if one of our esteemed and greatly appreciated REVIEWERS wishes to improve it, that sounds wonderful to me. If others see gaps that they feel need filling, I think it is fine for we, as fellow contributors, to review and incorporate if we feel there is value. I hope this makes sense. |
Summary
Extends CONTRIBUTING.md with comprehensive code guidelines for contributors, including:
Addresses feedback from maintainers on the initial submission.
Changes