1# Contributing 2 3## How do I... <a name="toc"></a> 4 5* [Use This Guide](#introduction)? 6* Ask or Say Something? 7 * [Request Support](#request-support) 8 * [Report an Error or Bug](#report-an-error-or-bug) 9 * [Request a Feature](#request-a-feature) 10* Make Something? 11 * [Project Setup](#project-setup) 12 * [Contribute Documentation](#contribute-documentation) 13 * [Contribute Code](#contribute-code) 14* Manage Something ✅ 15 * [Provide Support on Issues](#provide-support-on-issues) 16 * [Label Issues](#label-issues) 17 * [Clean Up Issues and PRs](#clean-up-issues-and-prs) 18 * [Review Pull Requests](#review-pull-requests) 19 * [Merge Pull Requests](#merge-pull-requests) 20 * [Tag a Release](#tag-a-release) 21 * [Join the Project Team](#join-the-project-team) 22* Add a Guide Like This One [To My Project](#attribution)? 23 24## Introduction 25 26Thank you so much for your interest in contributing! All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them! 27 28Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. 29 30The [Project Team](#join-the-project-team) looks forward to your contributions. ✨ 31 32## Request Support 33 34If you have a question about this project, how to use it, or just need clarification about something: 35 36* Open an Issue at https://github.com/zkat/miette/issues 37* Provide as much context as you can about what you're running into. 38* Provide project and platform versions, depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it. 39 40Once it's filed: 41 42* The project team will [label the issue](#label-issues). 43* Someone will try to have a response soon. 44* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made. 45 46## Report an Error or Bug 47 48If you run into an error or bug with the project: 49 50* Open an Issue at https://github.com/zkat/miette/issues 51* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own. 52* Provide project and platform versions, depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it. 53 54Once it's filed: 55 56* The project team will [label the issue](#label-issues). 57* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced. 58* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code). 59* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made. 60* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline. 61 62## Request a Feature 63 64If the project doesn't do something you need or want it to do: 65 66* Open an Issue at https://github.com/zkat/miette/issues 67* Provide as much context as you can about what you're running into. 68* Please try and be clear about why existing features and alternatives would not work for you. 69 70Once it's filed: 71 72* The project team will [label the issue](#label-issues). 73* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward. 74* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code). 75 76Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no. 77 78## Project Setup 79 80So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before. 81 82If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code). 83 84If you want to go the usual route and run the project locally, though: 85 86* [Install Rust](https://www.rust-lang.org/learn/get-started) 87* [Fork the project](https://guides.github.com/activities/forking/#fork) 88 89Then in your terminal: 90* `cd path/to/your/clone` 91* `cargo test --features fancy` 92 93And you should be ready to go! 94 95**Note:** If you don't include the "fancy" feature, one of the doc-tests will fail. 96 97## Contribute Documentation 98 99Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance. 100 101Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake! 102 103To contribute documentation: 104 105* [Set up the project](#project-setup). 106* Edit or add any relevant documentation. 107* Make sure your changes are formatted correctly and consistently with the rest of the documentation. 108* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything. 109* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(<component>): <message>`. 110* Go to https://github.com/zkat/miette/pulls and open a new pull request with your changes. 111* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing. 112 113Once you've filed the PR: 114 115* One or more maintainers will use GitHub's review feature to review your PR. 116* If the maintainer asks for any changes, edit your changes, push, and ask for another review. 117* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 118* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release) 119 120## Contribute Code 121 122We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others. 123 124Code contributions of just about any size are acceptable! 125 126The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution. 127 128To contribute code: 129 130* [Set up the project](#project-setup). 131* Make any necessary changes to the source code. 132* Include any [additional documentation](#contribute-documentation) the changes might need. 133* Write tests that verify that your contribution works as expected. 134* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). 135* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `<prefix>(deps): PKG@VERSION`, where `<prefix>` is any of the usual `conventional-changelog` prefixes, at your discretion. 136* Go to https://github.com/zkat/miette/pulls and open a new pull request with your changes. 137* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing. 138 139Once you've filed the PR: 140 141* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc). 142* One or more maintainers will use GitHub's review feature to review your PR. 143* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review. 144* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 145* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release) 146 147## Provide Support on Issues 148 149[Needs Collaborator](#join-the-project-team): none 150 151Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug. 152 153Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it. 154 155In order to help other folks out with their questions: 156 157* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/zkat/miette/issues?q=is%3Aopen+is%3Aissue+label%3Asupport). 158* Read through the list until you find something that you're familiar enough with to give an answer to. 159* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on. 160* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you. 161 162Some notes on picking up support issues: 163 164* Avoid responding to issues you don't know you can answer accurately. 165* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format. 166* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict). 167 168## Label Issues 169 170[Needs Collaborator](#join-the-project-team): Issue Tracker 171 172One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily. 173 174In order to label issues, [open up the list of unlabeled issues](https://github.com/zkat/miette/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself! 175 176Label | Apply When | Notes 177--- | --- | --- 178`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label. 179`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. | 180`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`. 181`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`) 182`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. | 183`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling. 184`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete. 185`performance` | This issue or PR is directly related to improving performance. | 186`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. | 187`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority. 188`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes. 189`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests) 190`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not. 191 192## Clean Up Issues and PRs 193 194[Needs Collaborator](#join-the-project-team): Issue Tracker 195 196Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon. 197 198In these cases, they should be closed until they're brought up again or the interaction starts over. 199 200To clean up issues and PRs: 201 202* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today. 203* Go through each issue *from oldest to newest*, and close them if **all of the following are true**: 204 * not opened by a maintainer 205 * not marked as `critical` 206 * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available) 207 * no explicit messages in the comments asking for it to be left open 208 * does not belong to a milestone 209* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/zkat/miette/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details." 210 211## Review Pull Requests 212 213[Needs Collaborator](#join-the-project-team): Issue Tracker 214 215While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions. 216 217PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration. 218 219Some notes: 220 221* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments". 222* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers. 223* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own. 224* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it? 225 226## Merge Pull Requests 227 228[Needs Collaborator](#join-the-project-team): Committer 229 230TBD - need to hash out a bit more of this process. 231 232## Tag A Release 233 234[Needs Collaborator](#join-the-project-team): Committer 235 236TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org). 237 238## Join the Project Team 239 240### Ways to Join 241 242There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do. 243 244All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like. 245 246You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names. 247 248Permission | Description 249--- | --- 250Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker. 251Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team. 252Admin/Owner | Granted to people ultimately responsible for the project, its community, etc. 253 254## Attribution 255 256This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)! 257 258