From 4126ec35d8a9f657292d037289ed272f93a426c5 Mon Sep 17 00:00:00 2001 From: Will Harney Date: Wed, 18 Jun 2025 11:30:04 -0400 Subject: [PATCH 1/4] chore: autofixes from prettier and markdownlint --- CODE_OF_CONDUCT.md | 60 +++++++++++++++++++++++----------------------- CONTRIBUTING.md | 48 +++++++++++++++++++++---------------- README.md | 1 - SECURITY.md | 2 +- license_info.md | 10 ++++---- 5 files changed, 65 insertions(+), 56 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index b4612a7..abd6112 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -8,8 +8,8 @@ culture where everyone feels included. Salesforce open-source projects are committed to providing a friendly, safe, and welcoming environment for all, regardless of gender identity and expression, -sexual orientation, disability, physical appearance, body size, ethnicity, nationality, -race, age, religion, level of experience, education, socioeconomic status, or +sexual orientation, disability, physical appearance, body size, ethnicity, nationality, +race, age, religion, level of experience, education, socioeconomic status, or other similar personal characteristics. The goal of this code of conduct is to specify a baseline standard of behavior so @@ -19,15 +19,15 @@ It also establishes a mechanism for reporting issues and resolving conflicts. All questions and reports of abusive, harassing, or otherwise unacceptable behavior in a Salesforce open-source project may be reported by contacting the Salesforce -Open Source Conduct Committee at ossconduct@salesforce.com. +Open Source Conduct Committee at . ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of gender -identity and expression, sexual orientation, disability, physical appearance, -body size, ethnicity, nationality, race, age, religion, level of experience, education, +our community a harassment-free experience for everyone, regardless of gender +identity and expression, sexual orientation, disability, physical appearance, +body size, ethnicity, nationality, race, age, religion, level of experience, education, socioeconomic status, or other similar personal characteristics. ## Our Standards @@ -35,23 +35,23 @@ socioeconomic status, or other similar personal characteristics. Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy toward other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy toward other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or -advances -* Personal attacks, insulting/derogatory comments, or trolling -* Public or private harassment -* Publishing, or threatening to publish, others' private information—such as -a physical or electronic address—without explicit permission -* Other conduct which could reasonably be considered inappropriate in a -professional setting -* Advocating for or encouraging any of the above behaviors +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Personal attacks, insulting/derogatory comments, or trolling +- Public or private harassment +- Publishing, or threatening to publish, others' private information—such as + a physical or electronic address—without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting +- Advocating for or encouraging any of the above behaviors ## Our Responsibilities @@ -77,29 +77,29 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the Salesforce Open Source Conduct Committee -at ossconduct@salesforce.com. All complaints will be reviewed and investigated -and will result in a response that is deemed necessary and appropriate to the -circumstances. The committee is obligated to maintain confidentiality with -regard to the reporter of an incident. Further details of specific enforcement +reported by contacting the Salesforce Open Source Conduct Committee +at . All complaints will be reviewed and investigated +and will result in a response that is deemed necessary and appropriate to the +circumstances. The committee is obligated to maintain confidentiality with +regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other -members of the project's leadership and the Salesforce Open Source Conduct +members of the project's leadership and the Salesforce Open Source Conduct Committee. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][contributor-covenant-home], -version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html. -It includes adaptions and additions from [Go Community Code of Conduct][golang-coc], +version 1.4, available at . +It includes adaptions and additions from [Go Community Code of Conduct][golang-coc], [CNCF Code of Conduct][cncf-coc], and [Microsoft Open Source Code of Conduct][microsoft-coc]. This Code of Conduct is licensed under the [Creative Commons Attribution 3.0 License][cc-by-3-us]. -[contributor-covenant-home]: https://www.contributor-covenant.org (https://www.contributor-covenant.org/) +[contributor-covenant-home]: https://www.contributor-covenant.org "https://www.contributor-covenant.org/" [golang-coc]: https://golang.org/conduct [cncf-coc]: https://github.com/cncf/foundation/blob/master/code-of-conduct.md [microsoft-coc]: https://opensource.microsoft.com/codeofconduct/ -[cc-by-3-us]: https://creativecommons.org/licenses/by/3.0/us/ \ No newline at end of file +[cc-by-3-us]: https://creativecommons.org/licenses/by/3.0/us/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 39f86ad..069ff00 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,10 +1,11 @@ -*This is a suggested `CONTRIBUTING.md` file template for use by open sourced Salesforce projects. The main goal of this file is to make clear the intents and expectations that end-users may have regarding this project and how/if to engage with it. Adjust as needed (especially look for `{project_slug}` which refers to the org and repo name of your project) and remove this paragraph before committing to your repo.* +_This is a suggested `CONTRIBUTING.md` file template for use by open sourced Salesforce projects. The main goal of this file is to make clear the intents and expectations that end-users may have regarding this project and how/if to engage with it. Adjust as needed (especially look for `{project_slug}` which refers to the org and repo name of your project) and remove this paragraph before committing to your repo._ # Contributing Guide For {NAME OF PROJECT} This page lists the operational governance model of this project, as well as the recommendations and requirements for how to best contribute to {PROJECT}. We strive to obey these as best as possible. As always, thanks for contributing – we hope these guidelines make it easier and shed some light on our approach and processes. # Governance Model + > Pick the most appropriate one ## Community Based @@ -32,26 +33,29 @@ Please join the community on {Here list Slack channels, Email lists, Glitter, Di Use GitHub Issues page to submit issues, enhancement requests and discuss ideas. ### Bug Reports and Fixes -- If you find a bug, please search for it in the [Issues](https://github.com/{project_slug}/issues), and if it isn't already tracked, - [create a new issue](https://github.com/{project_slug}/issues/new). Fill out the "Bug Report" section of the issue template. Even if an Issue is closed, feel free to comment and add details, it will still - be reviewed. -- Issues that have already been identified as a bug (note: able to reproduce) will be labelled `bug`. -- If you'd like to submit a fix for a bug, [send a Pull Request](#creating_a_pull_request) and mention the Issue number. - - Include tests that isolate the bug and verifies that it was fixed. + +- If you find a bug, please search for it in the [Issues](https://github.com/{project_slug}/issues), and if it isn't already tracked, + [create a new issue](https://github.com/{project_slug}/issues/new). Fill out the "Bug Report" section of the issue template. Even if an Issue is closed, feel free to comment and add details, it will still + be reviewed. +- Issues that have already been identified as a bug (note: able to reproduce) will be labelled `bug`. +- If you'd like to submit a fix for a bug, [send a Pull Request](#creating_a_pull_request) and mention the Issue number. +- Include tests that isolate the bug and verifies that it was fixed. ### New Features -- If you'd like to add new functionality to this project, describe the problem you want to solve in a [new Issue](https://github.com/{project_slug}/issues/new). -- Issues that have been identified as a feature request will be labelled `enhancement`. -- If you'd like to implement the new feature, please wait for feedback from the project - maintainers before spending too much time writing the code. In some cases, `enhancement`s may - not align well with the project objectives at the time. + +- If you'd like to add new functionality to this project, describe the problem you want to solve in a [new Issue](https://github.com/{project_slug}/issues/new). +- Issues that have been identified as a feature request will be labelled `enhancement`. +- If you'd like to implement the new feature, please wait for feedback from the project + maintainers before spending too much time writing the code. In some cases, `enhancement`s may + not align well with the project objectives at the time. ### Tests, Documentation, Miscellaneous -- If you'd like to improve the tests, you want to make the documentation clearer, you have an - alternative implementation of something that may have advantages over the way its currently - done, or you have any other change, we would be happy to hear about it! - - If its a trivial change, go ahead and [send a Pull Request](#creating_a_pull_request) with the changes you have in mind. - - If not, [open an Issue](https://github.com/{project_slug}/issues/new) to discuss the idea first. + +- If you'd like to improve the tests, you want to make the documentation clearer, you have an + alternative implementation of something that may have advantages over the way its currently + done, or you have any other change, we would be happy to hear about it! +- If its a trivial change, go ahead and [send a Pull Request](#creating_a_pull_request) with the changes you have in mind. +- If not, [open an Issue](https://github.com/{project_slug}/issues/new) to discuss the idea first. If you're new to our project and looking for some way to make your first contribution, look for Issues labelled `good first contribution`. @@ -75,9 +79,9 @@ Issues labelled `good first contribution`. # Creating a Pull Request -1. **Ensure the bug/feature was not already reported** by searching on GitHub under Issues. If none exists, create a new issue so that other contributors can keep track of what you are trying to add/fix and offer suggestions (or let you know if there is already an effort in progress). -3. **Clone** the forked repo to your machine. -4. **Create** a new branch to contain your work (e.g. `git br fix-issue-11`) +1. **Ensure the bug/feature was not already reported** by searching on GitHub under Issues. If none exists, create a new issue so that other contributors can keep track of what you are trying to add/fix and offer suggestions (or let you know if there is already an effort in progress). +2. **Clone** the forked repo to your machine. +3. **Create** a new branch to contain your work (e.g. `git br fix-issue-11`) 4. **Commit** changes to your own branch. 5. **Push** your work back up to your fork. (e.g. `git push fix-issue-11`) 6. **Submit** a Pull Request against the `main` branch and refer to the issue(s) you are fixing. Try not to pollute your pull request with unintended changes. Keep it simple and small. @@ -86,17 +90,21 @@ Issues labelled `good first contribution`. > **NOTE**: Be sure to [sync your fork](https://help.github.com/articles/syncing-a-fork/) before making a pull request. # Contributor License Agreement ("CLA") + In order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Salesforce's open source projects. Complete your CLA here: # Issues + We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue. # Code of Conduct + Please follow our [Code of Conduct](CODE_OF_CONDUCT.md). # License + By contributing your code, you agree to license your contribution under the terms of our project [LICENSE](LICENSE.txt) and to sign the [Salesforce CLA](https://cla.salesforce.com/sign-cla) diff --git a/README.md b/README.md index b2beac8..502b57d 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,3 @@ A repo containing all the basic file templates and general guidelines for any op It's required that all files must be placed at the top level of your repository. > **NOTE** Your README should contain detailed, useful information about the project! - diff --git a/SECURITY.md b/SECURITY.md index e31774d..8249025 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,4 +4,4 @@ Please report any security issue to [security@salesforce.com](mailto:security@sa as soon as it is discovered. This library limits its runtime dependencies in order to reduce the total cost of ownership as much as can be, but all consumers should remain vigilant and have their security stakeholders review all third-party -products (3PP) like this one and their dependencies. \ No newline at end of file +products (3PP) like this one and their dependencies. diff --git a/license_info.md b/license_info.md index d61db85..2201bd2 100644 --- a/license_info.md +++ b/license_info.md @@ -1,9 +1,9 @@ -License Info ------------- +## License Info -Most projects we open source should use the [Apache License v2](https://opensource.org/license/apache-2-0/) license. Samples, demos, and blog / doc code examples should instead use [CC-0](https://creativecommons.org/publicdomain/zero/1.0/). If you strongly feel your project should perhaps use a different license clause, please engage with legal team. +Most projects we open source should use the [Apache License v2](https://opensource.org/license/apache-2-0/) license. Samples, demos, and blog / doc code examples should instead use [CC-0](https://creativecommons.org/publicdomain/zero/1.0/). If you strongly feel your project should perhaps use a different license clause, please engage with legal team. For the ALv2 license, create a `LICENSE.txt` file (or use the one in this template repo) in the root of your repo containing: + ``` Apache License Version 2.0 @@ -216,6 +216,7 @@ All rights reserved. ``` The shorter version of license text should be added as a comment to all Salesforce-authored source code and configuration files that support comments. This include file formats like HTML, CSS, JavaScript, XML, etc. which aren't directly code, but are still critical to your project code. Like: + ``` /* * Copyright (c) 2023, Salesforce, Inc. @@ -233,11 +234,12 @@ The shorter version of license text should be added as a comment to all Salesfor * See the License for the specific language governing permissions and * limitations under the License. */ - ``` +``` Note that there are many tools that exist to do this sort of thing in an automated fashion, without having to manually edit every single file in your project. It is highly recommended that you research some of these tools for your particular language / build system. For sample, demo, and example code, we recommend the [Unlicense](https://opensource.org/license/unlicense/) license. Create a `LICENSE.txt` file containing: + ``` This is free and unencumbered software released into the public domain. From 6623fc8d1984df30bcf2a406281d3916457bd044 Mon Sep 17 00:00:00 2001 From: Will Harney Date: Wed, 18 Jun 2025 11:40:23 -0400 Subject: [PATCH 2/4] docs(contributing): clean up placeholders Use a more consistent style to make them easier to find, and use reference-style links to reduce the number of placeholders. --- CONTRIBUTING.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 069ff00..8ee51a3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,8 @@ -_This is a suggested `CONTRIBUTING.md` file template for use by open sourced Salesforce projects. The main goal of this file is to make clear the intents and expectations that end-users may have regarding this project and how/if to engage with it. Adjust as needed (especially look for `{project_slug}` which refers to the org and repo name of your project) and remove this paragraph before committing to your repo._ +_This is a suggested `CONTRIBUTING.md` file template for use by open sourced Salesforce projects. The main goal of this file is to make clear the intents and expectations that end-users may have regarding this project and how/if to engage with it. Replace placeholders and adjust content as needed, then remove this paragraph before committing to your repo._ -# Contributing Guide For {NAME OF PROJECT} +# Contributing Guide For {NAME_OF_PROJECT} -This page lists the operational governance model of this project, as well as the recommendations and requirements for how to best contribute to {PROJECT}. We strive to obey these as best as possible. As always, thanks for contributing – we hope these guidelines make it easier and shed some light on our approach and processes. +This page lists the operational governance model of this project, as well as the recommendations and requirements for how to best contribute to {NAME_OF_PROJECT}. We strive to obey these as best as possible. As always, thanks for contributing – we hope these guidelines make it easier and shed some light on our approach and processes. # Governance Model @@ -26,7 +26,7 @@ The intent and goal of open sourcing this project is because it may contain usef # Getting started -Please join the community on {Here list Slack channels, Email lists, Glitter, Discord, etc... links}. Also please make sure to take a look at the project [roadmap](ROADMAP.md) to see where are headed. +Please join the community on {COMMUNITY_LINKS}. Also please make sure to take a look at the project [roadmap](ROADMAP.md) to see where are headed. # Issues, requests & ideas @@ -34,8 +34,8 @@ Use GitHub Issues page to submit issues, enhancement requests and discuss ideas. ### Bug Reports and Fixes -- If you find a bug, please search for it in the [Issues](https://github.com/{project_slug}/issues), and if it isn't already tracked, - [create a new issue](https://github.com/{project_slug}/issues/new). Fill out the "Bug Report" section of the issue template. Even if an Issue is closed, feel free to comment and add details, it will still +- If you find a bug, please search for it in the [Issues][issues], and if it isn't already tracked, + [create a new issue][new_issue]. Fill out the "Bug Report" section of the issue template. Even if an Issue is closed, feel free to comment and add details, it will still be reviewed. - Issues that have already been identified as a bug (note: able to reproduce) will be labelled `bug`. - If you'd like to submit a fix for a bug, [send a Pull Request](#creating_a_pull_request) and mention the Issue number. @@ -43,7 +43,7 @@ Use GitHub Issues page to submit issues, enhancement requests and discuss ideas. ### New Features -- If you'd like to add new functionality to this project, describe the problem you want to solve in a [new Issue](https://github.com/{project_slug}/issues/new). +- If you'd like to add new functionality to this project, describe the problem you want to solve in a [new Issue][new_issue]. - Issues that have been identified as a feature request will be labelled `enhancement`. - If you'd like to implement the new feature, please wait for feedback from the project maintainers before spending too much time writing the code. In some cases, `enhancement`s may @@ -55,7 +55,7 @@ Use GitHub Issues page to submit issues, enhancement requests and discuss ideas. alternative implementation of something that may have advantages over the way its currently done, or you have any other change, we would be happy to hear about it! - If its a trivial change, go ahead and [send a Pull Request](#creating_a_pull_request) with the changes you have in mind. -- If not, [open an Issue](https://github.com/{project_slug}/issues/new) to discuss the idea first. +- If not, [open an Issue][new_issue] to discuss the idea first. If you're new to our project and looking for some way to make your first contribution, look for Issues labelled `good first contribution`. @@ -108,3 +108,6 @@ Please follow our [Code of Conduct](CODE_OF_CONDUCT.md). # License By contributing your code, you agree to license your contribution under the terms of our project [LICENSE](LICENSE.txt) and to sign the [Salesforce CLA](https://cla.salesforce.com/sign-cla) + +[issues]: https://github.com/{PROJECT_SLUG}/issues +[new_issue]: https://github.com/{PROJECT_SLUG}/issues/new From 5cd78ceec12f084eb2a3ff625125bba445221dbd Mon Sep 17 00:00:00 2001 From: Will Harney Date: Wed, 18 Jun 2025 11:43:03 -0400 Subject: [PATCH 3/4] docs(contributing): update heading levels documents should only have one top-level heading --- CONTRIBUTING.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8ee51a3..b59e348 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,31 +4,31 @@ _This is a suggested `CONTRIBUTING.md` file template for use by open sourced Sal This page lists the operational governance model of this project, as well as the recommendations and requirements for how to best contribute to {NAME_OF_PROJECT}. We strive to obey these as best as possible. As always, thanks for contributing – we hope these guidelines make it easier and shed some light on our approach and processes. -# Governance Model +## Governance Model > Pick the most appropriate one -## Community Based +### Community Based The intent and goal of open sourcing this project is to increase the contributor and user base. The governance model is one where new project leads (`admins`) will be added to the project based on their contributions and efforts, a so-called "do-acracy" or "meritocracy" similar to that used by all Apache Software Foundation projects. > or -## Salesforce Sponsored +### Salesforce Sponsored The intent and goal of open sourcing this project is to increase the contributor and user base. However, only Salesforce employees will be given `admin` rights and will be the final arbitrars of what contributions are accepted or not. > or -## Published but not supported +### Published but not supported The intent and goal of open sourcing this project is because it may contain useful or interesting code/concepts that we wish to share with the larger open source community. Although occasional work may be done on it, we will not be looking for or soliciting contributions. -# Getting started +## Getting started Please join the community on {COMMUNITY_LINKS}. Also please make sure to take a look at the project [roadmap](ROADMAP.md) to see where are headed. -# Issues, requests & ideas +## Issues, requests & ideas Use GitHub Issues page to submit issues, enhancement requests and discuss ideas. @@ -60,7 +60,7 @@ Use GitHub Issues page to submit issues, enhancement requests and discuss ideas. If you're new to our project and looking for some way to make your first contribution, look for Issues labelled `good first contribution`. -# Contribution Checklist +## Contribution Checklist - [x] Clean, simple, well styled code - [x] Commits should be atomic and messages must be descriptive. Related issues should be mentioned by Issue number. @@ -77,7 +77,7 @@ Issues labelled `good first contribution`. - [x] Reviews - Changes must be approved via peer code review -# Creating a Pull Request +## Creating a Pull Request 1. **Ensure the bug/feature was not already reported** by searching on GitHub under Issues. If none exists, create a new issue so that other contributors can keep track of what you are trying to add/fix and offer suggestions (or let you know if there is already an effort in progress). 2. **Clone** the forked repo to your machine. @@ -89,23 +89,23 @@ Issues labelled `good first contribution`. > **NOTE**: Be sure to [sync your fork](https://help.github.com/articles/syncing-a-fork/) before making a pull request. -# Contributor License Agreement ("CLA") +## Contributor License Agreement ("CLA") In order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Salesforce's open source projects. Complete your CLA here: -# Issues +## Issues We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue. -# Code of Conduct +## Code of Conduct Please follow our [Code of Conduct](CODE_OF_CONDUCT.md). -# License +## License By contributing your code, you agree to license your contribution under the terms of our project [LICENSE](LICENSE.txt) and to sign the [Salesforce CLA](https://cla.salesforce.com/sign-cla) From cdaabcbf75537ddbf9111a94e4fcce07d11fa711 Mon Sep 17 00:00:00 2001 From: Will Harney Date: Wed, 18 Jun 2025 11:43:51 -0400 Subject: [PATCH 4/4] docs(contributing): remove redundant issues section --- CONTRIBUTING.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b59e348..77d2ebb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,8 @@ Please join the community on {COMMUNITY_LINKS}. Also please make sure to take a ## Issues, requests & ideas -Use GitHub Issues page to submit issues, enhancement requests and discuss ideas. +Use the GitHub Issues page to submit issues, enhancement requests and discuss ideas. Please ensure your description is +clear and has sufficient instructions to be able to reproduce the issue. ### Bug Reports and Fixes @@ -96,11 +97,6 @@ to do this once to work on any of Salesforce's open source projects. Complete your CLA here: -## Issues - -We use GitHub issues to track public bugs. Please ensure your description is -clear and has sufficient instructions to be able to reproduce the issue. - ## Code of Conduct Please follow our [Code of Conduct](CODE_OF_CONDUCT.md).