Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update creating-a-default-community-health-file.md #34270

Closed
wants to merge 10 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,30 @@

## About default community health files

Default community health files are a set of predefined files that provide guidance and templates for maintaining a healthy and collaborative open source project.
You can add default community health files to a public repository called `.github`, in the root of the repository or in the `docs` or `.github` folders. These files help you automate and standardize various aspects of your project's development and community interaction. They are essential for promoting transparency, good practices, and collaboration in open source projects.
Default community health files are a set of predefined files that provide guidance and templates for maintaining a healthy and collaborative open source project. These files help you automate and standardize various aspects of your project's development and community interaction, promoting transparency, good practices, and collaboration.

{% data variables.product.product_name %} will use and display default files for any repository owned by the account that does not have its own file of that type in any of the following places:
You can add default community health files to a public repository called `.github`. {% data variables.product.product_name %} will use and display default files for any repository owned by the account that does not have its own file of that type. The location of these default files determines whether and how they will be used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can add default community health files to a public repository called `.github`. {% data variables.product.product_name %} will use and display default files for any repository owned by the account that does not have its own file of that type. The location of these default files determines whether and how they will be used.
You can add default community health files to a public repository called `.github` and {% data variables.product.product_name %} will use and display default files for any repository owned by the account that does not have its own file of that type, or create them directly in the relevant repository for higher specificity.


* The root of the repository
* The `.github` folder
* The `docs` folder
### File Location and Precedence
Copy link
Contributor

@janbrasna janbrasna Aug 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd either skip the heading or move it after "… good practices, collaboration" before starting to talk about any actual files and their locations.

Suggested change
### File Location and Precedence


For example, anyone who creates an issue or pull request in a repository that does not have its own CONTRIBUTING file will see a link to the default CONTRIBUTING file. If a repository has any files in its own `.github/ISSUE_TEMPLATE` folder, including issue templates or a _config.yml_ file, none of the contents of the default `.github/ISSUE_TEMPLATE` folder will be used.
When a repository does not contain its own file of a specific type, {% data variables.product.product_name %} will look for a default file in the following order:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My original note somewhat persists; it's worded "if a local file is not present, the order will be: 1) local file, 2) global file" which contradicts itself;] — so I guess to show there's an order just skipping the opening of the sentence makes it more correct:

Suggested change
When a repository does not contain its own file of a specific type, {% data variables.product.product_name %} will look for a default file in the following order:
{% data variables.product.product_name %} will look for a default file in the following order:


Default files won’t appear in the file browser or Git history and are not included in clones, packages, or downloads of individual repositories because they are stored only in the `.github` repository.
1. **Within the Local Repository**:
1. `.github` folder
1. Root of the repository
1. `docs` folder
1. **Within the `.github` Repository**:
1. `.github` folder
1. Root of the repository
1. `docs` folder
Comment on lines +27 to +34
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure "Local" is a correct term here when git is a distributed system — I'd leave that to content triage folks to chime in with some better recommendation (see the original wording how it carefully avoids using any other phrase than just "repository" in pointing to the current repo?)

Maybe to improve scanability:

Suggested change
1. **Within the Local Repository**:
1. `.github` folder
1. Root of the repository
1. `docs` folder
1. **Within the `.github` Repository**:
1. `.github` folder
1. Root of the repository
1. `docs` folder
1. `.github` folder in the project's repository
1. Root of the repository
1. `docs` folder of the project's repository
1. `.github` folder in the `.github` repository
1. Root of the `.github` repository
1. `docs` folder of the `.github` repository

to explicitly show the lookup is completely linear, not either–or i.e. repo/docs still precedes .github/.github …


If no corresponding file is found in the local repository, {% data variables.product.product_name %} will use the default file from the `.github` repository, following the same order of precedence.

For example, if someone creates an issue or pull request in a repository that does not have its own `CONTRIBUTING.md` file, {% data variables.product.product_name %} will check the local repository first and, if no file is found, it will fall back to the default `CONTRIBUTING.md` in the `.github` repository.

However, if a repository contains any files in its own `.github/ISSUE_TEMPLATE` folder, such as issue templates or a `_config.yml` file, none of the contents of the default `.github/ISSUE_TEMPLATE` folder in the `.github` repository will be used. This allows repository maintainers to override the default files with specific templates or configurations as needed.
Comment on lines +36 to +40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to simplify already stated:

Suggested change
If no corresponding file is found in the local repository, {% data variables.product.product_name %} will use the default file from the `.github` repository, following the same order of precedence.
For example, if someone creates an issue or pull request in a repository that does not have its own `CONTRIBUTING.md` file, {% data variables.product.product_name %} will check the local repository first and, if no file is found, it will fall back to the default `CONTRIBUTING.md` in the `.github` repository.
However, if a repository contains any files in its own `.github/ISSUE_TEMPLATE` folder, such as issue templates or a `_config.yml` file, none of the contents of the default `.github/ISSUE_TEMPLATE` folder in the `.github` repository will be used. This allows repository maintainers to override the default files with specific templates or configurations as needed.
For example, anyone who creates an issue or pull request in a repository that does not have its own `CONTRIBUTING.md` file will see a link to the default `CONTRIBUTING.md` from the `.github` repository. However, if a repository has any files in its own `.github/ISSUE_TEMPLATE` folder, such as issue templates or a `_config.yml` file, none of the contents of the default `.github/ISSUE_TEMPLATE` folder will be used. This allows repository maintainers to override the default files with specific templates or content on per-repository basis.


Default files do not appear in the file browser, are not part of the Git history, and are excluded from clones, packages, or downloads of individual repositories because they exist only in the `.github` repository.

{% ifversion fpt or ghec %}

Expand All @@ -42,7 +54,7 @@
Community health file | Description
--- | ---{% ifversion fpt or ghec %}
_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)."{% endif %}
_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)."{% ifversion discussion-category-forms %}

Check warning on line 57 in content/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file.md

View workflow job for this annotation

GitHub Actions / lint-content

Liquid `ifversion` (and `elsif`) should not always be true

The Liquid ifversion condition 'discussion-category-forms' includes all possible versions and will always be true.
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)."{% endif %}{% ifversion fpt or ghec %}
_FUNDING.yml_ | A FUNDING file displays a sponsor button in your repository to increase the visibility of funding options for your open source project. For more information, see "[AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository)."{% endif %}
_GOVERNANCE.md_ | A GOVERNANCE file lets people know about how your project is governed. For example, it might discuss project roles and how decisions are made.
Expand Down
Loading