Skip to content

Commit 841108d

Browse files
loganrosenCopilotmchammer01
authored
Document adding a code of conduct on GHES (#63003)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com> Copilot-Session: e6c570c7-912d-463d-adc9-e83de49b99d4
1 parent 48bf9e9 commit 841108d

9 files changed

Lines changed: 27 additions & 18 deletions

File tree

content/actions/how-tos/create-and-publish-actions/release-and-maintain-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ Using semantic releases means that the users of your actions can pin their workf
8989
{% data variables.product.github %} provides tools and guides to help you work with the open source community. Here are a few tools we recommend setting up for healthy bidirectional communication. By providing the following signals to the community, you encourage others to use, modify, and contribute to your action:
9090

9191
* Maintain a `README` with plenty of usage examples and guidance. For more information, see [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes).
92-
* Include a workflow status badge in your `README` file. For more information, see [AUTOTITLE](/actions/how-tos/monitor-workflows/add-a-status-badge). Also visit [shields.io](https://shields.io/) to learn about other badges that you can add.{% ifversion fpt or ghec %}
93-
* Add community health files like `CODE_OF_CONDUCT`, `CONTRIBUTING`, and `SECURITY`. For more information, see [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file#supported-file-types).{% endif %}
92+
* Include a workflow status badge in your `README` file. For more information, see [AUTOTITLE](/actions/how-tos/monitor-workflows/add-a-status-badge). Also visit [shields.io](https://shields.io/) to learn about other badges that you can add.
93+
* Add community health files like `CODE_OF_CONDUCT`, `CONTRIBUTING`, and `SECURITY`. For more information, see [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file#supported-file-types).
9494
* Keep issues current by utilizing actions like [actions/stale](https://github.com/actions/stale).{% ifversion fpt or ghec %}
9595
* Use {% data variables.product.github %}'s security features to communicate about vulnerabilities and how to fix them. For more information, see [AUTOTITLE](/actions/reference/security/secure-use#protecting-actions-youve-created).{% endif %}
9696

content/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ redirect_from:
77
versions:
88
fpt: '*'
99
ghec: '*'
10+
ghes: '*'
1011
shortTitle: Add a code of conduct
1112
category:
1213
- Set up your project for contributions
@@ -19,13 +20,19 @@ Before adopting a code of conduct for your project:
1920
* Research different codes of conduct designed for open source projects. Choose one that reflects your community's standards.
2021
* Consider carefully whether you are willing and able to enforce it.
2122

22-
You can add a code of conduct to your project by using a template or manually creating a custom code of conduct. Your code of conduct will be available either way, but "Code of conduct" will only be marked as complete in your repository's community profile if you use a template. If you use a code of conduct written by another person or organization, be sure to follow any attribution guidelines from the source. For more information about community profiles, see [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/about-community-profiles-for-public-repositories).
23+
{% ifversion fpt or ghec %}
24+
You can add a code of conduct to your project by using a template or manually creating a custom code of conduct. Your code of conduct will be available either way. In a public repository's community profile, "Code of conduct" is marked as added if the file is not empty and does not state that the project has no code of conduct. If you use a code of conduct written by another person or organization, be sure to follow any attribution guidelines from the source. For more information about community profiles, see [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/about-community-profiles-for-public-repositories).
25+
{% else %}
26+
You can add a code of conduct to your project by manually creating a custom code of conduct file. If you use a code of conduct written by another person or organization, be sure to follow any attribution guidelines from the source.
27+
{% endif %}
2328

24-
You can create a default code of conduct for your organization or personal account. For more information, see [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file).
29+
You can create a default code of conduct for your organization{% ifversion ghec %} or, unless you are signed in with a {% data variables.enterprise.prodname_managed_user %}, for your personal account{% else %} or personal account{% endif %}. For more information, see [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file).
30+
31+
{% ifversion fpt or ghec %}
2532

2633
## Adding a code of conduct using a template
2734

28-
{% data variables.product.github %} provides templates for common codes of conduct to help you quickly add a code of conduct to your project.
35+
{% data variables.product.github %} provides templates for common codes of conduct to help you quickly add a code of conduct to your project. To use a template, you must have write access to the repository.
2936

3037
{% data reusables.repositories.navigate-to-repo %}
3138
{% data reusables.files.add-file %}
@@ -40,16 +47,18 @@ You can create a default code of conduct for your organization or personal accou
4047
{% data reusables.files.choose_commit_branch %}
4148
{% data reusables.files.propose_new_file %}
4249

50+
{% endif %}
51+
4352
## Adding a code of conduct manually
4453

45-
If the code of conduct you want to use isn't available in the provided templates, you can manually add a code of conduct.
54+
{% ifversion fpt or ghec %}If the code of conduct you want to use isn't available in the provided templates, you can manually add a code of conduct.{% else %}You can manually add a code of conduct to your project.{% endif %}
4655

4756
{% data reusables.repositories.navigate-to-repo %}
4857
{% data reusables.files.add-file %}
49-
1. In the file name field, type the name and extension for the file.
50-
* To make your code of conduct visible in the repository's root directory, type _CODE_OF_CONDUCT_ in the file name field.
51-
* To make your code of conduct visible in the repository's `docs` directory, type _docs/CODE_OF_CONDUCT_.
52-
* To make your code of conduct visible in the repository's `.github` directory, type _.github/CODE_OF_CONDUCT_.
58+
1. In the file name field, type the path and name for the file. {% data variables.product.github %} looks for a code of conduct in the `.github` directory, then the root of the repository, then the `docs` directory, and uses the first file it finds.
59+
* To add your code of conduct to the repository's `.github` directory, type _.github/CODE_OF_CONDUCT.md_.
60+
* To add your code of conduct to the repository's root directory, type _CODE_OF_CONDUCT.md_.
61+
* To add your code of conduct to the repository's `docs` directory, type _docs/CODE_OF_CONDUCT.md_.
5362
1. In the new file, add your custom code of conduct.
5463
{% data reusables.files.write_commit_message %}
5564
{% data reusables.files.choose_commit_branch %}

content/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ You can create defaults in your organization or personal account for the followi
6161

6262
| Community health file | Description |
6363
| --- | --- |
64-
| _CODE_OF_CONDUCT.md_ | A CODE_OF_CONDUCT file defines standards for how to engage in a community.{% ifversion fpt or ghec %} For more information, see [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project).{% endif %} |
64+
| _CODE_OF_CONDUCT.md_ | A CODE_OF_CONDUCT file defines standards for how to engage in a community. For more information, see [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project). |
6565
| _CONTRIBUTING.md_ | A CONTRIBUTING file communicates how people should contribute to your project. For more information, see [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors). |
6666
| Discussion category forms | Discussion category forms customize the templates that are available for community members to use when they open new discussions in your repository. For more information, see [AUTOTITLE](/discussions/managing-discussions-for-your-community/creating-discussion-category-forms). |
6767
| {% ifversion fpt or ghec %} |

content/discussions/managing-discussions-for-your-community/managing-discussions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ category:
2020

2121
Organization owners can choose the permissions required to create a discussion in repositories owned by the organization. Similarly, to choose the permissions required to create an organization discussion, organization owners can change the permissions required in the source repository. For more information, see [AUTOTITLE](/organizations/managing-organization-settings/managing-discussion-creation-for-repositories-in-your-organization).
2222

23-
As a discussions maintainer, you can create community resources to encourage discussions that are aligned with the overall project goal and maintain a friendly open forum for collaborators. Creating{% ifversion fpt or ghec %} a code of conduct or{% endif %} contribution guidelines for collaborators to follow will help facilitate a collaborative and productive forum. For more information on creating community resources, see{% ifversion fpt or ghec %} [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project), and{% endif %} [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors).
23+
As a discussions maintainer, you can create community resources to encourage discussions that are aligned with the overall project goal and maintain a friendly open forum for collaborators. Creating a code of conduct or contribution guidelines for collaborators to follow will help facilitate a collaborative and productive forum. For more information on creating community resources, see [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project) and [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors).
2424

2525
When a discussion yields an idea or bug that is ready to be worked on, you can create a new issue from a discussion. For more information, see [AUTOTITLE](/issues/tracking-your-work-with-issues/using-issues/creating-an-issue#creating-an-issue-from-discussion).
2626

content/discussions/managing-discussions-for-your-community/moderating-discussions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Moderating discussions
3-
intro: 'You can promote healthy collaboration by marking comments as answers, locking or unlocking discussions, converting issues to discussions, and editing or deleting comments, discussions, and categories that don''t align with your{% ifversion fpt or ghec %} community''s code of conduct{% elsif ghes %} organization''s contribution guidelines{% endif %}.'
3+
intro: 'You can promote healthy collaboration by marking comments as answers, locking or unlocking discussions, converting issues to discussions, and editing or deleting comments, discussions, and categories that don''t align with your community''s code of conduct.'
44
permissions: People with triage access to a repository can moderate discussions in the repository. People with triage access to the source repository for organization discussions can moderate discussions in the organization.
55
versions:
66
fpt: '*'
@@ -21,7 +21,7 @@ category:
2121

2222
## Locking discussions
2323

24-
It's appropriate to lock a conversation when the entire conversation is not constructive or violates your community's code of conduct or {% data variables.product.prodname_dotcom %}'s [Community Guidelines](/free-pro-team@latest/site-policy/github-terms/github-community-guidelines). You can also lock a conversation to prevent comments on a discussion you want to use as an announcement to the community. When you lock a conversation, people with write access to the repository, or source repository for organization discussions, will still be able to comment on the discussion. You can also allow emoji reactions to a locked discussion.
24+
It's appropriate to lock a conversation when the entire conversation is not constructive or violates your community's code of conduct or {% data variables.product.prodname_dotcom %}'s [Community Guidelines](/site-policy/github-terms/github-community-guidelines). You can also lock a conversation to prevent comments on a discussion you want to use as an announcement to the community. When you lock a conversation, people with write access to the repository, or source repository for organization discussions, will still be able to comment on the discussion. You can also allow emoji reactions to a locked discussion.
2525

2626
> [!NOTE]
2727
> You can also close a discussion. For more information, see [Closing a discussion](/discussions/managing-discussions-for-your-community/managing-discussions#closing-a-discussion).

content/discussions/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ You can welcome your community and introduce a new way to communicate in a repos
5151

5252
## Setting up community guidelines for contributors
5353

54-
For repository discussions, you can set contributing guidelines to encourage collaborators to have meaningful, useful conversations that are relevant to the repository. You can also update the repository's README to communicate expectations on when collaborators should open an issue or discussion. For more information about providing guidelines for your project, see{% ifversion fpt or ghec %} [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project) and{% endif %} [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions).
54+
For repository discussions, you can set contributing guidelines to encourage collaborators to have meaningful, useful conversations that are relevant to the repository. You can also update the repository's README to communicate expectations on when collaborators should open an issue or discussion. For more information about providing guidelines for your project, see [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project) and [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions).
5555

5656
For organization discussions, you share information about how to engage with your organization by creating an organization profile README. For more information, see [AUTOTITLE](/organizations/collaborating-with-groups-in-organizations/customizing-your-organizations-profile).
5757

content/get-started/using-github/communicating-on-github.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,6 @@ For issues, for example, you can tag issues with labels for quicker searching an
144144

145145
For pull requests, you can create draft pull requests if your proposed changes are still a work in progress. Draft pull requests cannot be merged until they're marked as ready for review. For more information, see [AUTOTITLE](/pull-requests/reference/pull-requests#draft-pull-requests).
146146

147-
For {% data variables.product.prodname_discussions %}, you can{% ifversion fpt or ghec %} set up a code of conduct and{% endif %} pin discussions that contain important information for your community. For more information, see [AUTOTITLE](/discussions/collaborating-with-your-community-using-discussions/about-discussions).
147+
For {% data variables.product.prodname_discussions %}, you can set up a code of conduct and pin discussions that contain important information for your community. For more information, see [AUTOTITLE](/discussions/collaborating-with-your-community-using-discussions/about-discussions).
148148

149149
To learn some advanced formatting features that will help you communicate, see [AUTOTITLE](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github).

content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ category:
1919

2020
{% data reusables.repositories.about-READMEs %}
2121

22-
For more information about providing guidelines for your project, see {% ifversion fpt or ghec %}[AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project) and {% endif %}[AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions).
22+
For more information about providing guidelines for your project, see [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project) and [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions).
2323

2424
A README is often the first item a visitor will see when visiting your repository. README files typically include information on:
2525
* What the project does
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
You can add a README file to a repository to communicate important information about your project. A README, along with a repository license, citation file{% ifversion fpt or ghec %}, contribution guidelines, and a code of conduct{% elsif ghes %} and contribution guidelines{% endif %}, communicates expectations for your project and helps you manage contributions.
1+
You can add a README file to a repository to communicate important information about your project. A README, along with a repository license, citation file, contribution guidelines, and a code of conduct, communicates expectations for your project and helps you manage contributions.

0 commit comments

Comments
 (0)