diff --git a/CODEOWNERS b/CODEOWNERS index 0ded67ad..37df2687 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -3,3 +3,5 @@ # Comment line immediately above ownership line is reserved for related other information. Please be careful while editing. #ECCN:Open Source +#GUSINFO:Platform CLI,Platform CLI +* @salesforcecli/cli diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..7f547bd2 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,105 @@ +# Salesforce Open Source Community Code of Conduct + +## About the Code of Conduct + +Equality is a core value at Salesforce. We believe a diverse and inclusive +community fosters innovation and creativity, and are committed to building a +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 +other similar personal characteristics. + +The goal of this code of conduct is to specify a baseline standard of behavior so +that people with different social values and communication styles can work +together effectively, productively, and respectfully in our open source community. +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. + +## 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, +socioeconomic status, or other similar personal characteristics. + +## Our Standards + +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 + +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 + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned with this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project email +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +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 +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 +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], +[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/' +[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/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..3059f646 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,59 @@ +## Contributing + +1. Please create a new issue [here](https://github.com/forcedotcom/cli/issues) before starting any work so that we can also offer suggestions or let you know if there is already an effort in progress. +1. Fork this repository (external contributors) or branch off `main` (committers). +1. Create a topic branch based on `main`. This is recommended but not required if contributing using a fork. +1. Edit the code in your fork/branch. +1. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without associated tests. +1. Sign the Salesforce [CLA](#cla). +1. The CLI team will review your pull request and provide feedback. +1. Once merged, a new release of `@salesforce/plugin-command-reference` will be published to [npm](https://www.npmjs.com/package/@salesforce/plugin-command-reference). + +### One-Time Setup + +1. Install [Node.js](https://nodejs.org). Use the version specified in the `engines` field of package.json. If you work with multiple Node versions, consider using [nvm](https://github.com/nvm-sh/nvm). +1. Install [Yarn](https://yarnpkg.com): `npm install --global yarn` +1. Configure [git commit signing](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification). + +### CLA + +External contributors are required to sign a Contributor License +Agreement. You can do so by going to https://cla.salesforce.com/sign-cla. + +## Branches + +- We work in branches off of `main`. +- Our release (aka. _production_) branch is `main`. +- Our work happens in _topic_ branches (feature and/or bug-fix). + - Feature as well as bug-fix branches are based on `main` + - Branches _should_ be kept up-to-date using `rebase` + +## Pull Requests + +- Develop features and bug fixes in _topic_ branches off main, or forks. +- _Topic_ branches can live in forks (external contributors) or within this repository (internal contributors). + - When creating _topic_ branches in this repository please prefix with `/`. For example: `mb/refactor-tests`. +- Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) to drive semver versioning. Examples: + - `chore: my chore message` --> No release + - `fix: my fix message` --> Patch release + - `feat: my feat message` --> Minor release +- PRs will be reviewed and merged by the CLI team. + +## Testing + +All changes must have associated tests. This plugin uses a combination of unit testing and NUTs (non-unit tests). + +- Run unit tests with `yarn test`. Tests use the mocha framework and are located in the `test` directory with the naming pattern `.test.ts`. +- Run integration tests (NUTs) with `yarn test:nuts`. NUTs use the [cli-plugins-testkit](https://github.com/salesforcecli/cli-plugins-testkit) framework and run against the default devhub in your environment. + +## Debugging + +Refer to the [Salesforce CLI Plugin Developer Guide](https://developer.salesforce.com/docs/platform/salesforce-cli-plugin/guide/debug-plugin.html) for debugging tips. + +## Useful Yarn Commands + +- `yarn build` — Compile the TypeScript source +- `yarn build --watch` — Recompile automatically on file changes +- `yarn test` — Run unit tests +- `yarn test:nuts` — Run integration tests (NUTs) +- `yarn lint` — Run the linter diff --git a/README.md b/README.md index 4538f0bc..c57c9ae3 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,10 @@ Then you can run this in your plugin's CI. ./bin/dev commandreference --plugins --error-on-warnings ``` +## Contributing + +If you're interested in contributing, take a look at the [CONTRIBUTING](CONTRIBUTING.md) guide. + ## Local Development If you need to make changes to this repository, the easiest thing to do is to link it to your Salesforce CLI. After you cloned this plugin, run the following from this plugin directory: