From e4a0140ebd2a16511fcdf055f1549bf5a27f016d Mon Sep 17 00:00:00 2001 From: Christopher Morton Date: Thu, 15 Dec 2022 13:21:44 +0000 Subject: [PATCH 1/4] docs: add contribution guide --- CONTIRBUTING.md | 129 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 CONTIRBUTING.md diff --git a/CONTIRBUTING.md b/CONTIRBUTING.md new file mode 100644 index 00000000..8410a593 --- /dev/null +++ b/CONTIRBUTING.md @@ -0,0 +1,129 @@ +# Contributing to _dotenvy_ + +**Thank you very much for considering to contribute to this project!** + +We welcome any form of contribution: + +- Asking for help +- Reporting a bug +- Adding a feature +- Fixing a problem +- Improving the code +- Sharing ideas +- Adding documentation +- Adding examples +- Fixing spelling/grammar errors +- _etc..._ + +**Note**: Before making a large change, it is a good idea to open an issue +describing the change to solicit feedback and guidance. This will increase the +likelihood of the PR getting merged and help avoid multiple people writing the +same solution. + +This guide will help you get started. Do not let this guide intimidate you. It +should be considered a map to help you navigate the process. + +## Conduct + +The `dotenvy` project adheres to the [Rust Code of +Conduct](https://www.rust-lang.org/policies/code-of-conduct). + +## Issues + +Please feel free to open an [issue](https://github.com/allan2/dotenvy/issues), +or comment on existing issues regarding any topic. If you would like to attempt +to implement a change, you can ask for help or guidance on solving a problem, or +just let us know you are working on it. + +A maintainer will mark the issue as assigned to you to avoid other people +unknowingly working on the same thing. If you notice an old assigned issue still +has no update, please still ask. We can reassign as necessary. + +This project sometimes has longer form +[discussions](https://github.com/allan2/dotenvy/discussions). Feel free to +comment on existing threads or open your own. + +## Pull Requests + +Pull Requests are the way concrete changes are made to the code, documentation, +and dependencies in the dotenvy repository. + +Even tiny pull requests (e.g., one character pull request fixing a typo in API +documentation) are greatly appreciated. Before making a large change, it is +usually a good idea to first open an issue describing the change to solicit +feedback and guidance. This will increase the likelihood of the PR getting +merged. + +### Tests + +If the change being proposed alters code (as opposed to only documentation for +example), it is either adding new functionality to a crate or it is fixing +existing, broken functionality. In both of these cases, the pull request should +include one or more tests to ensure that the crate does not regress in the +future. + +### Discuss and update + +You will probably get feedback or requests for changes to your Pull Request. +This is a big part of the submission process so don't be discouraged! Some +contributors may sign off on the Pull Request right away, others may have more +detailed comments or feedback. This is a necessary part of the process in order +to evaluate whether the changes are correct and necessary. + +Any community member can review a PR and you might get conflicting feedback. +Keep an eye out for comments from code owners to provide guidance on conflicting +feedback. + +#### Commit Squashing + +In most cases, do not squash commits that you add to your Pull Request during +the review process. When the commits in your Pull Request land, they may be +squashed into one commit per logical change. Metadata will be added to the +commit message (including links to the Pull Request, links to relevant issues, +and the names of the reviewers). The commit history of your Pull Request, +however, will stay intact on the Pull Request page. + +### CI + +Our continuous integration workflow checks all pull requests to ensure: + +- All tests pass on stable and [MSRV] +- No [clippy](https://github.com/rust-lang/rust-clippy) errors or warnings +- [Rustfmt](https://github.com/rust-lang/rustfmt) is adhered to +- [Rustdoc](https://doc.rust-lang.org/rustdoc/write-documentation/linking-to-items-by-name.html) + links work. + +Before submitting a PR, it may be worth running these checks yourself. + +#### MSRV + +Check the [readme][MSRV] for the current +minimum supported rust version. We are open to updating it. + +#### Add an entry to the changelog + +If your contribution changes the behavior of dotenvy, please update the +[`CHANGELOG.md`](CHANGELOG.md) file and describe your changes. This makes the +release process much easier and therefore helps to get your changes into a new +dotenvy release faster. + +The top of the `CHANGELOG` contains an **Unreleased** section with a few +subsections (Added, Changed, etc) Please add your entry to the subsection +that best describes your change. If a relevant subsection does not yet exist, please +create it. + +Entries follow this format: + +```md +### Changed + +- Short description of what has been changed ([PR #123](pull.request.url)) by [username](github.profile.url) +- [**BREAKING**] Please prefix any breaking changes +``` + +Here, `#123` is the number of your pull request. + +**NOTE**: It is a good idea to push the +changelog update to your branch after opening the PR. That way you can copy the number and link. + +[MSRV]: README.md#minimum-supported-rust-version \ No newline at end of file From e2b1fd188c0f54cc8ad18f3aedde0ad06da3bfd8 Mon Sep 17 00:00:00 2001 From: Christopher Morton Date: Thu, 15 Dec 2022 13:27:32 +0000 Subject: [PATCH 2/4] docs: link contribution guide in readme --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f093c201..1d926191 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,15 @@ It also adds: For a full list of changes, refer to the [changelog](./CHANGELOG.md). +## Contributing + +Thank you very much for considering to contribute to this project! See +[CONTRIBUTING.md](./CONTRIBUTING.md) for details. + +**Note**: Before you take the time to open a pull request, please open an issue first. + ## The legend Legend has it that the Lost Maintainer will return, merging changes from `dotenvy` into `dotenv` with such thrust that all `Cargo.toml`s will lose one keystroke. Only then shall the Rust dotenv crateverse be united in true harmony. -Until then, this repo dutifully carries on the dotenv torch. It is actively maintained. Contributions and PRs are very welcome! +Until then, this repo dutifully carries on the dotenv torch. It is actively maintained. From adbab39e14f8bb53acf469c8ccee1af50d4857e8 Mon Sep 17 00:00:00 2001 From: Christopher Morton Date: Fri, 16 Dec 2022 18:02:00 +0000 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Allan --- CONTIRBUTING.md | 65 +++++++++++++++---------------------------------- 1 file changed, 20 insertions(+), 45 deletions(-) diff --git a/CONTIRBUTING.md b/CONTIRBUTING.md index 8410a593..0eabbc75 100644 --- a/CONTIRBUTING.md +++ b/CONTIRBUTING.md @@ -2,18 +2,13 @@ **Thank you very much for considering to contribute to this project!** -We welcome any form of contribution: - -- Asking for help -- Reporting a bug -- Adding a feature -- Fixing a problem -- Improving the code -- Sharing ideas -- Adding documentation -- Adding examples -- Fixing spelling/grammar errors -- _etc..._ +We welcome any form of contribution, including: + +- reporting or fixing bugs +- requesting or adding features +- doc changes (including spelling/grammar corrections) +- adding examples +- asking for help, sharing ideas **Note**: Before making a large change, it is a good idea to open an issue describing the change to solicit feedback and guidance. This will increase the @@ -30,14 +25,13 @@ Conduct](https://www.rust-lang.org/policies/code-of-conduct). ## Issues -Please feel free to open an [issue](https://github.com/allan2/dotenvy/issues), -or comment on existing issues regarding any topic. If you would like to attempt +Please feel free to open new [issues](https://github.com/allan2/dotenvy/issues), +or comment on existing ones. If you would like to attempt to implement a change, you can ask for help or guidance on solving a problem, or just let us know you are working on it. A maintainer will mark the issue as assigned to you to avoid other people -unknowingly working on the same thing. If you notice an old assigned issue still -has no update, please still ask. We can reassign as necessary. +unknowingly working on the same thing. If you would like to work on an assigned issue that has not been updated in a while, just ask to have it reassigned to you. This project sometimes has longer form [discussions](https://github.com/allan2/dotenvy/discussions). Feel free to @@ -48,52 +42,33 @@ comment on existing threads or open your own. Pull Requests are the way concrete changes are made to the code, documentation, and dependencies in the dotenvy repository. -Even tiny pull requests (e.g., one character pull request fixing a typo in API -documentation) are greatly appreciated. Before making a large change, it is -usually a good idea to first open an issue describing the change to solicit +Even tiny PRs, like a one character change to fix a typo in the docs, are greatly appreciated. Before making a large change, it is recommended to first open an issue describing the change as to solicit feedback and guidance. This will increase the likelihood of the PR getting merged. ### Tests -If the change being proposed alters code (as opposed to only documentation for -example), it is either adding new functionality to a crate or it is fixing -existing, broken functionality. In both of these cases, the pull request should -include one or more tests to ensure that the crate does not regress in the -future. +If you are modifying the code, make sure all tests pass. If you are adding new functionality, please add related tests. ### Discuss and update -You will probably get feedback or requests for changes to your Pull Request. -This is a big part of the submission process so don't be discouraged! Some -contributors may sign off on the Pull Request right away, others may have more -detailed comments or feedback. This is a necessary part of the process in order -to evaluate whether the changes are correct and necessary. +If you receive feedback on your PR, please don't be discouraged. It's just part of the process to ensure that changes to the project are correct and necessary. -Any community member can review a PR and you might get conflicting feedback. -Keep an eye out for comments from code owners to provide guidance on conflicting -feedback. +Any community member can review a PR. #### Commit Squashing -In most cases, do not squash commits that you add to your Pull Request during -the review process. When the commits in your Pull Request land, they may be -squashed into one commit per logical change. Metadata will be added to the -commit message (including links to the Pull Request, links to relevant issues, -and the names of the reviewers). The commit history of your Pull Request, -however, will stay intact on the Pull Request page. +There is no need to squash your commits manually. PRs are usually squash merged anyway. ### CI -Our continuous integration workflow checks all pull requests to ensure: +Please ensure that your PR passes the CI checks: -- All tests pass on stable and [MSRV] -- No [clippy](https://github.com/rust-lang/rust-clippy) errors or warnings -- [Rustfmt](https://github.com/rust-lang/rustfmt) is adhered to +- all tests pass on stable and [MSRV] +- no [clippy](https://github.com/rust-lang/rust-clippy) warnings or errors +- formatted with [Rustfmt](https://github.com/rust-lang/rustfmt) - [Rustdoc](https://doc.rust-lang.org/rustdoc/write-documentation/linking-to-items-by-name.html) - links work. - -Before submitting a PR, it may be worth running these checks yourself. + links work #### MSRV From a52a3e52d633115d7ed77596ce5044f1b0846059 Mon Sep 17 00:00:00 2001 From: Christopher Morton Date: Fri, 16 Dec 2022 18:05:21 +0000 Subject: [PATCH 4/4] docs: remove excess msrv section --- CONTIRBUTING.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CONTIRBUTING.md b/CONTIRBUTING.md index 0eabbc75..15b085eb 100644 --- a/CONTIRBUTING.md +++ b/CONTIRBUTING.md @@ -70,11 +70,6 @@ Please ensure that your PR passes the CI checks: - [Rustdoc](https://doc.rust-lang.org/rustdoc/write-documentation/linking-to-items-by-name.html) links work -#### MSRV - -Check the [readme][MSRV] for the current -minimum supported rust version. We are open to updating it. - #### Add an entry to the changelog If your contribution changes the behavior of dotenvy, please update the @@ -101,4 +96,4 @@ Here, `#123` is the number of your pull request. **NOTE**: It is a good idea to push the changelog update to your branch after opening the PR. That way you can copy the number and link. -[MSRV]: README.md#minimum-supported-rust-version \ No newline at end of file +[MSRV]: README.md#minimum-supported-rust-version