Skip to content

How the .github defaults work (and why) #3

Description

@zaccesss

Why this repo exists

I keep a lot of repositories and want the same community-health files on all of them without copying and re-editing them everywhere. GitHub reads a special account-level .github repository as the default: any public repository of mine that does not carry its own copy of one of these files falls back to the version here. So I maintain one set in one place; every repo inherits it.

The canonical-home pattern

Each policy document has one canonical home, and the .github file is a short summary that links to it. This keeps a single source of truth and lets each doc live where it renders best.

Document Canonical home The .github file
Contributing zaccesss/contribute and my site short summary linking both
Code of conduct zaccesss/code-of-conduct and my site short summary linking both
Security policy zaccesss/security-policy and my site short summary linking both
Support isaacadjei.me/contact short pointer

Each summary carries a callout on its key line (how to report a concern, how to report a vulnerability) and my contact details, so a reader gets the essentials without leaving GitHub.

What GitHub inherits from here

For any of my repositories that lacks its own copy, GitHub falls back to these:

  • CODE_OF_CONDUCT.md, CONTRIBUTING.md, SECURITY.md, SUPPORT.md (the summaries above)
  • .github/FUNDING.yml (the sponsor button)
  • .github/ISSUE_TEMPLATE/ and .github/PULL_REQUEST_TEMPLATE.md

A repository that has its own version of any of these overrides the default, so my polished per-repo files (git-unlocked, phaemos, the portfolio) keep winning where they exist.

The issue and PR templates

The issue templates are structured YAML forms with validation checkboxes:

  • Bug report (bug_report.yml) - what happened, steps and context, plus checks that it is not a security issue, that I have read the guides and that it is written in the reporter's own words. Hardware setups are prompted for too.
  • Idea or improvement (feature_request.yml) - the problem first, then the idea.
  • Typo or small fix (typo.yml) - with an invitation to just open a pull request.

config.yml turns off blank issues and routes questions to my contact page and security reports to the security repo. The pull request template carries a full checklist: focused, tested, docs updated, no secrets, written in your own words, code of conduct, security.

What does NOT inherit

GitHub only inherits the community-health files above. It does not inherit:

  • CODEOWNERS
  • dependabot.yml
  • WORKFLOW.md (my "how I work here" doc, kept at .github/WORKFLOW.md)

Those are applied per repository instead. The canonical WORKFLOW.md template lives here at .github/WORKFLOW.md, and the /repo-ops scaffold command stamps it, along with those other non-inherited files, the canonical labels and my standard settings, into a repository on demand. Private repositories, which do not inherit the public .github at all, also get the health files this way.

Notes

  • My GitHub profile page is driven by my zaccesss repository, not this one.
  • Website versions of the contributing guide and the code of conduct are planned; the security policy already lives at isaacadjei.me/security-policy.
  • This repo is managed, mirrored and backed up by my automation like any other.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

contentWriting or content work

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions