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

Conversation

MariusStorhaug
Copy link

@MariusStorhaug MariusStorhaug commented Aug 10, 2024

Why:

Closes: #34271

What's being changed (if available, include any code snippets, screenshots, or gifs):

Check off the following:

  • I have reviewed my changes in staging, available via the View deployment link in this PR's timeline (this link will be available after opening the PR).

    • For content changes, you will also see an automatically generated comment with links directly to pages you've modified. The comment won't appear if your PR only edits files in the data directory.
  • For content changes, I have completed the self-review checklist.

Copy link

welcome bot commented Aug 10, 2024

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@MariusStorhaug MariusStorhaug marked this pull request as draft August 10, 2024 09:02
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Aug 10, 2024
Copy link
Contributor

github-actions bot commented Aug 10, 2024

Automatically generated comment ℹ️

This comment is automatically generated and will be overwritten every time changes are committed to this branch.

The table contains an overview of files in the content directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the data directory will not show up in this table.


Content directory changes

You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.

Source Preview Production What Changed
communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file.md fpt
ghec
ghes@ 3.14 3.13 3.12 3.11 3.10
fpt
ghec
ghes@ 3.14 3.13 3.12 3.11 3.10

fpt: Free, Pro, Team
ghec: GitHub Enterprise Cloud
ghes: GitHub Enterprise Server

@MariusStorhaug MariusStorhaug marked this pull request as ready for review August 10, 2024 09:12
@MariusStorhaug
Copy link
Author

MariusStorhaug commented Aug 10, 2024

Proof to verify the process:

  1. Local repository:
    • The .github folder. (proof)
    • The root folder. (proof)
    • The docs folder. (proof)
  2. The .github repository:
    • The .github folder. (proof)
    • The root folder. (proof)
    • The docs folder. (proof)

Link to the demo page:
https://docs-34270-a121e7.preview.ghdocs.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file

@Joy1994j

This comment was marked as spam.

@Receptua

This comment was marked as spam.

@Cassy1012

This comment was marked as spam.

@Cassy1012

This comment was marked as spam.

@nguyenalex836 nguyenalex836 added content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review communities Content related to Communities and removed triage Do not begin working on this issue until triaged by the team labels Aug 12, 2024
@nguyenalex836
Copy link
Contributor

@MariusStorhaug Thanks so much for opening a PR! I'll get this triaged for review ✨

Comment on lines 22 to 33
{% 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:
{% 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 the following order:

* The root of the repository
* The `.github` folder
* The `docs` folder
1. Local repository:
1. The `.github` folder.
1. The root of the repository.
1. The `docs` folder.
1. The `.github` repository:
1. The `.github` folder.
1. The root of the repository.
1. The `docs` folder.

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually the original wording is not incorrect at all, as it doesn't even consider any precedence at all;)

If you read the context above and below, it shows that there are some defaults in .github repo, and unless you have a local content in any of the specified places those defaults would kick in, with some rules about using either all or none in the templates config below.

I mean, what you're trying to say is important and well observed, it just doesn't fit into the existing content breakdown (describing what happens if "that does not have its own file of that type") — you may want to reword the surrounding paragraphs too for this to make sense, or document the file order precedence generally, separately from the existing paragraphs?

Copy link
Author

Choose a reason for hiding this comment

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

I also do agree with the original description. I just want to make it even more clear how it works. Hope the changes are in line with your thoughts. If not, feel free to give specifics on what you want to see changed.

Copy link
Contributor

@janbrasna janbrasna left a comment

Choose a reason for hiding this comment

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

I'm not the right person to offer language or style advice;] that's the triage/content folks' turf to make sure it makes sense altogether with the new additions, I see just a few logic simplification opportunities here:


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:

Comment on lines +27 to +34
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
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 …


{% 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

Comment on lines +36 to +40
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.
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.

@MariusStorhaug MariusStorhaug deleted the patch-1 branch August 21, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
communities Content related to Communities content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review
Projects
None yet
6 participants