Skip to content

DispatchesΒΆ

Set Shared GitHub Defaults with a .github Repository

Every GitHub account, whether a personal profile or an organization with dozens of developers, eventually accumulates the same boilerplate problem. You add a CONTRIBUTING.md to one repository, a CODE_OF_CONDUCT.md to another, issue and pull request templates to a third, and none of them are consistent. When someone opens a new repository, they either copy files from an older one (hoping they are still current) or start from scratch.

GitHub has a solution to help set defaults: the .github repository. It is a specialized repository you create under your personal account or organization that acts as a default configuration layer for every repository that does not define its own. One place to maintain community health files, contribution guidelines, security policies, issue templates, and (for organizations) standardized workflow templates that appear in the Actions UI across every repository in the org.

This post covers what a .github repository is, what goes inside it, how to set one up, and an honest look at the benefits and the tradeoffs.

Refactoring Python if/elif Chains with Tuple Comparisons and Dispatch Tables

Long if/elif chains that test multiple conditions together are a common pattern in Python modules, particularly in Ansible modules that branch on a state parameter paired with a secondary flag. They work, but as the number of combinations grows, the code becomes harder to read and harder to extend without introducing bugs.

This post shows two practical refactoring options that make multi-condition branching cleaner, more readable, and easier to scale.

Python Code Quality: Black, Flake8, and Ruff

Python's flexibility is a feature, but that same flexibility means every team is one undocumented style preference away from a code review thread about trailing whitespace. Linters and formatters exist to take those conversations off the table and keep them there.

Three tools dominate the Python ecosystem today: Black, the opinionated formatter; Flake8, the composable linting wrapper; and Ruff, the Rust-powered all-in-one tool that has become the default choice for new projects. Each takes a different approach to the same goal of keeping Python code clean, consistent, and readable.

This post covers what each tool does, the trade-offs involved in choosing between them, who is behind each project, and why Ruff has become the tool to reach for on a greenfield Python project in 2026.

Configuring the GitHub Issue Template Chooser

When you add issue templates to a GitHub repository, the "New Issue" button no longer opens a blank editor. GitHub replaces it with a chooser: a page that lists each template by name and description and, by default, includes a link that lets contributors skip the templates and open a blank issue. The chooser is useful on its own, but a small configuration file alongside your templates gives you considerably more control over what contributors see and where they can go.

The file, .github/ISSUE_TEMPLATE/config.yml, controls two things: whether blank issues are allowed, and whether additional links appear in the chooser that point contributors to discussions, documentation, or other resources.

This post covers how the file works, what options it supports, and how I use it across my own projects.

Elevate Your Git Workflow: A Guide to Using pre-commit

Every developer has pushed a commit they immediately regretted: a trailing whitespace violation that failed the linter, a file left with Windows line endings, a secret accidentally included in a configuration file, or a Go source file that was never formatted with gofmt. These are the kinds of issues that are trivial to catch but easy to forget under deadline pressure. Pre-commit hooks are the last line of defense between your editor and your repository, and pre-commit is the framework that makes managing them across multiple languages and projects practical.

This post covers what pre-commit is, why you should consider it in your development workflow, how to get it running on your machine, how to run it in CI, and how to use your own hook repository.