Skip to content

docs: Extend CONTRIBUTING.md with code guidelines#4299

Open
jlaportebot wants to merge 2 commits into
google:masterfrom
jlaportebot:docs/extend-contributing-guidelines
Open

docs: Extend CONTRIBUTING.md with code guidelines#4299
jlaportebot wants to merge 2 commits into
google:masterfrom
jlaportebot:docs/extend-contributing-guidelines

Conversation

@jlaportebot

Copy link
Copy Markdown

Summary

Extends CONTRIBUTING.md with comprehensive code guidelines for contributors, including:

  • Code style and formatting standards
  • Testing requirements and patterns
  • Documentation expectations
  • Commit message conventions
  • Code review guidelines

Addresses feedback from maintainers on the initial submission.

Changes

  • Added detailed code guidelines section
  • Clarified testing expectations
  • Documented commit message format
  • Added code review checklist

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)
@gmlewis gmlewis changed the title docs: extend CONTRIBUTING.md with code guidelines docs: Extend CONTRIBUTING.md with code guidelines Jun 13, 2026
@alexandear

Copy link
Copy Markdown
Contributor

@jlaportebot Why was the previous PR #4202 closed? It has a lot of useful comments.

@alexandear

Copy link
Copy Markdown
Contributor

@gmlewis I think updating the CONTRIBUTING.md should be done either by a maintainer (you), a reviewer, or any contributor with a significant number of merged commits into the library — e.g., the top 15 from the graph.

@gmlewis

gmlewis commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

@gmlewis I think updating the CONTRIBUTING.md should be done either by a maintainer (you), a reviewer, or any contributor with a significant number of merged commits into the library — e.g., the top 15 from the graph.

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.

@gmlewis gmlewis added NeedsReview PR is awaiting a review before merging. waiting for signed CLA labels Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NeedsReview PR is awaiting a review before merging. waiting for signed CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants