CONTRIBUTING.md (9083B)
1 # Windows Package Manager Contributor's Guide 2 3 Below is our guidance for how to report issues, propose new features, and submit contributions via Pull Requests (PRs). 4 5 ## Open Development Workflow 6 7 The Windows Package Manager team is VERY active in this GitHub Repository. In fact, we live in it all day long and carry out all our development in the open! 8 9 When the team finds issues we file them in the repository. When we propose new ideas or think up new features, we file new feature requests. When we work on fixes or features, we create branches and work on those improvements. And when PRs are reviewed, we review them in public - including all the good, the bad, and the ugly parts. 10 11 The point of doing all this work in public is to ensure that we are holding ourselves to a high degree of transparency, and so that the community sees that we apply the same processes and hold ourselves to the same quality bar as we do to community-submitted issues and PRs. We also want to make sure that we expose our team culture and "tribal knowledge" that is inherent in any closely-knit team, which often contains considerable value to those new to the project who are trying to figure out "why the heck does this thing look/work like this???" 12 13 ### Repository Bot 14 15 The team triages new issues several times a week. During triage, the team uses labels to categorize, manage, and drive the project workflow. 16 17 We employ a bot to help us automate common processes within our workflow. 18 19 We drive the bot by tagging issues with specific labels which cause the bot engine to close issues, merge branches, etc. This bot engine helps us keep the repository clean by automating the process of notifying appropriate parties if/when information/follow-up is needed, and closing stale issues/PRs after reminders have remained unanswered for several days. 20 21 Therefore, if you do file issues, or create PRs, please keep an eye on your GitHub notifications. If you do not respond to requests for information, your issues/PRs may be closed automatically. 22 23 --- 24 ## Reporting Security Issues 25 26 **Please do not report security vulnerabilities through public GitHub issues.** Instead, please report them to the Microsoft Security Response Center (MSRC). See [SECURITY.md](./SECURITY.md) for more information. 27 28 ## Before you start, file an issue 29 30 Please follow this simple rule to help us eliminate any unnecessary wasted effort & frustration, and ensure an efficient and effective use of everyone's time - yours, ours, and other community members': 31 32 > 👉 If you have a question, think you've discovered an issue, would like to propose a new feature, etc., then find/file an issue **BEFORE** starting work to fix/implement it. 33 34 ### Search existing issues first 35 36 Before filing a new issue, search existing open and closed issues first: This project is moving fast! It is likely someone else has found the problem you're seeing, and someone may be working on or have already contributed a fix! 37 38 If no existing item describes your issue/feature, great - please file a new issue: 39 40 ### File a new Issue 41 42 * Don't know whether you're reporting an issue or requesting a feature? File an issue 43 * Have a question that you don't see answered in docs, videos, etc.? File an issue 44 * Want to know if we're planning on building a particular feature? Create a discussion 45 * Got a great idea for a new feature? File an issue/request/idea 46 * Don't understand how to do something? Create a discussion 47 * Found an existing issue that describes yours? Great - upvote and add additional commentary / info / repro-steps / etc. 48 49 When you hit "New Issue", select the type of issue closest to what you want to report/ask/request: 50 51 ### Complete the template 52 53 **Complete the information requested in the issue template, providing as much information as possible**. The more information you provide, the more likely your issue/ask will be understood and implemented. Helpful information includes: 54 55 👉 Tip: Run the following command 56 57 `winget --info` 58 59 * What tools and apps you're using (e.g. VS 2019, VSCode, etc.) 60 * Don't assume we're experts in setting up YOUR environment and don't assume we are experts in `<your distro/tool of choice>`. Teach us to help you! 61 * **We LOVE detailed reproduction steps!** What steps do we need to take to reproduce the issue? Assume we love to read reproduction steps. As much detail as you can stand is probably _barely_ enough detail for us! 62 * Prefer error message text where possible or screenshots of errors if text cannot be captured. 63 * We MUCH prefer text command-line script than screenshots of command-line script. 64 * **If you intend to implement the fix/feature yourself then say so!** If you do not indicate otherwise we will assume that the issue is our to solve, or may label the issue as `Help-Wanted`. 65 66 ### DO NOT post "+1" comments 67 68 > ⚠ DO NOT post "+1", "me too", or similar comments - they just add noise to an issue. 69 70 If you don't have any additional info/context to add but would like to indicate that you're affected by the issue, upvote the original issue by clicking its [+😊] button and hitting 👍 (+1) icon. This way we can actually measure how impactful an issue is. 71 72 --- 73 74 ## Contributing fixes / features 75 76 For those able & willing to help fix issues and/or implement features ... 77 78 ### To Spec or not to Spec 79 80 Some issues/features may be quick and simple to describe and understand. For such scenarios, once a team member has agreed with your approach, skip ahead to the section headed "Fork, Branch, and Create your PR", below. 81 82 Small issues that do not require a spec will be labeled Issue-Bug or Issue-Task. 83 84 However, some issues/features will require careful thought & formal design before implementation. For these scenarios, we'll request that a spec is written and the associated issue will be labeled Issue-Feature. 85 86 Specs help collaborators discuss different approaches to solving a problem, describe how the feature will behave, how the feature will impact the user, what happens if something goes wrong, etc. Driving towards agreement in a spec, before any code is written, often results in simpler code, and less wasted effort in the long run. 87 88 Specs will be managed in a very similar manner as code contributions so please follow the "Fork, Branch, and Create your PR" below. 89 90 ### Writing / Contributing-to a Spec 91 92 To write/contribute to a spec: fork, branch, and commit via PRs, as you would with any code changes. 93 94 Specs are written in markdown, stored under the `/doc/specs` folder, and named `[issue id] - [spec description].md`. 95 96 👉 **It is important to follow the spec templates and complete the requested information**. The available spec templates will help ensure that specs contain the minimum information & decisions necessary to permit development to begin. In particular, specs require you to confirm that you've already discussed the issue/idea with the team in an issue and that you provide the issue ID for reference. 97 98 Team members will be happy to help review specs and guide them to completion. 99 100 ### Help Wanted 101 102 Once the team has approved an issue/spec, development can proceed. If no developers are immediately available, the spec can be parked ready for a developer to get started. Parked specs' issues will be labeled "Help Wanted". To find a list of development opportunities waiting for developer involvement, visit the Issues and filter on [the Help-Wanted label](https://github.com/microsoft/winget-cli/labels/Help%20Wanted). 103 104 --- 105 106 ## Development 107 108 ### Fork, Clone, Branch and Create your PR 109 110 Once you've discussed your proposed feature/fix/etc. with a team member, and you've agreed an approach or a spec has been written and approved, it's time to start development: 111 112 1. Fork the repository if you haven't already. 113 1. Clone your fork locally. 114 1. Create & push a feature branch. 115 1. Create a [Draft Pull Request (PR)](https://github.blog/2019-02-14-introducing-draft-pull-requests/). 116 1. Work on your changes. 117 1. Build and see if it works. 118 119 ### Testing 120 121 Testing is a key component in the development workflow. 122 123 ### Code Review 124 125 When you'd like the team to take a look, (even if the work is not yet fully-complete), mark the Draft PR as 'Ready For Review' so that the team can review your work and provide comments, suggestions, and request changes. It may take several cycles, but the result will be solid, testable, conformant code that is safe for us to merge. 126 127 > ⚠ Remember: **changes you make may affect both the Windows Package Manager and the schema support implemented in our validation pipelines!** Because of this, we will treat community PRs with the same level of scrutiny and rigor as commits submitted to the official Windows source by team members and partners. 128 129 ### Merge 130 131 Once your code has been reviewed and approved by the requisite number of team members, it will be merged into the main branch. Once merged, your PR will be automatically closed. 132 133 --- 134 135 ## Thank you 136 137 Thank you in advance for your contribution! Now, [what's next on the list](https://github.com/microsoft/winget-cli/labels/Help%20Wanted)? 😜