Contributor Covenant 2.1: Complete Guide
Complete guide to the Contributor Covenant version 2.1, the most widely adopted code of conduct for open source projects. Covers all sections, customization, and adoption.
Detailed Explanation
Contributor Covenant 2.1
The Contributor Covenant is the most popular code of conduct for open source communities. Version 2.1, released in 2021, is used by over 100,000 projects including Kubernetes, Ruby on Rails, Swift, and Linux.
Key Sections
The Contributor Covenant 2.1 includes six main sections:
Our Pledge — A commitment to making the community harassment-free for everyone, explicitly listing protected characteristics (age, disability, ethnicity, gender identity, experience level, etc.)
Our Standards — Concrete examples of positive behavior (empathy, respectful disagreement, accepting feedback) and unacceptable behavior (sexualized content, trolling, harassment, doxing)
Enforcement Responsibilities — Defines community leaders' role in clarifying standards and taking corrective action
Scope — Clarifies that the code applies in all community spaces and when representing the community publicly
Enforcement — Provides a reporting mechanism with a contact email
Enforcement Guidelines — A four-tier system:
- Correction: Private warning for minor first offenses
- Warning: Formal warning with consequences for repeat behavior
- Temporary Ban: Time-limited removal from community interaction
- Permanent Ban: Permanent removal for sustained violations
What Changed from 2.0
Version 2.1 added clarifications around the scope of enforcement, refined language around community impact levels, and improved the enforcement guidelines to be more actionable for maintainers.
Adoption
To adopt the Contributor Covenant, place the generated CODE_OF_CONDUCT.md in your repository root. GitHub will automatically detect it and display a badge in your repository sidebar.
Use Case
Starting a new open source project or adopting a standard code of conduct for an existing community that needs a well-recognized, comprehensive behavioral framework.