Learn

Any project on the internet open to the public, open source repository or otherwise, needs a code of conduct, or policy around what is or isn’t acceptable behavior. Open source projects can involve many people who might not have the same understanding of what constitutes acceptable conduct on the internet. A code of conduct formalizes and helps explain the project’s policies.

Open source projects typically place their code of conduct in a “CODE_OF_CONDUCT” file in their repository.

A great number of standard code of conduct policies exist. Many open source projects, including several run by Codecademy, use a standard one named the “Contributor Covenant”.

Let’s add that file to your repository!

Instructions

  1. Visit https://contributor-covenant.org in the web browser and read through the two sections there: “A Code of Conduct for Open Source Communities” and “Before You Adopt Contributor Covenant”. Click Run once you’re done reading.
  2. Click on “English (Markdown version)” lower in the page to access the text in Markdown format. Copy the contents of that page. Click Run once it’s copied.
  3. Back in your repository, click the Add file button and then Create new file. Name the file CODE_OF_CONDUCT.md.
  4. Paste the contents of the Contributor Covenant’s code_of_conduct.md into the file, replacing [INSERT CONTACT METHOD] with an email of yours.

Tip: You can use whatever valid email you want on the file. Make sure it’s an email you’re ok with being visible on the internet.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?